The Developer Preview of Apex "Version Settings" Support in 2GP is an Important Step on the Path to 1GP->2GP Migration

The Developer Preview of Apex "Version Settings" Support in 2GP is an Important Step on the Path to 1GP->2GP Migration

The Apex and Packaging teams are seeking partners and customers who build managed 2GPs to participate in a Developer Preview that's vital to the GA release of 1GP-2GP migration in 2025.

Sign Up Today: 2GP "Version Settings" Developer Preview

Salesforce is asking our community of customer and partner developers to preview this important feature to help find and report issues and provide usability feedback before it's released in Spring '25 (safe harbor).

Why Was This Feature Built?

  • Apex classes created by a subscriber (i.e., someone who installs a managed package) can be “pinned” to a specific version of any installed 1GP in the subscriber’s org.
  • Historically, 2GPs do not support the "version pinning" capability 1GP has because 2GPs are created without "version settings" support.
  • This lack of "version settings" parity will prevent some 1GPs from being migrated to 2GP, blocking 2GP migration from going GA.
  • Salesforce will add 2GP “version settings” support in the Spring '25 release to address this gap and ensure all 1GPs can be migrated to 2GP.

How can 2GP Developers Help?

  1. Sign up for the 2GP "Version Settings" Developer Preview.
  2. Install an existing 2GP in a scratch org or sandbox.
  3. Create a VPI-enabled version of that existing 2GP, using the installed version as ancestor.
  4. Upgrade the 2GP you installed in a scratch org or sandbox with the VPI-enabled version you just created.
  5. BONUS! If your package has Global Apex, create a subscriber class that references the global Apex in your package. Pin that subscriber class to an earlier version of your managed package.
  6. Share any feedback or issues you encounter with the Dev Preview team.

How Can I Learn More About Apex "Version Pinning?"

  1. Visit the sfdx-isv/preview-2gp-version-settings repo on GitHub.
  2. Follow the instructions in the README file.
  3. Get hands-on with the Experiments ONE, TWO, and THREE.
  4. If you don't have time to get hands-on, you can still get an idea of how things work by reading the step-by-step instructions and included screenshots.

Thank You!

The Apex and Packaging teams appreciate your help testing this important functionality. If you have questions, you can engage me (Vivek Chawla) in the comments.

要查看或添加评论,请登录

社区洞察

其他会员也浏览了