Deprecation notices

This document contains a list of snapcraft deprecation notices and recommendations:

  • DN1: The snap keyword has been replaced by prime
  • DN2: Custom plugins should now be placed in snap/plugins
  • DN3: Assets in setup/gui should now be placed in snap/gui
  • DN4: The history command has been renamed to list-revisions
  • DN5: Aliases are now handled by the Snap Store, and shouldn’t be placed in the snap
  • DN6: Use of the snap command with a directory has been deprecated in favour of the pack command
  • DN7: The prepare keyword has been replaced by override-build (or override-pull)
  • DN8: The build keyword has been replaced by override-build
  • DN9: The install keyword has been replaced by override-build
  • DN10: The version-script keyword has been replaced by snapcraftctl set-version
  • DN11: The push keywords have been replaced by upload equivalents
  • DN12: The registered and list-registered keywords has been replaced by list
  • DN13: Support for legacy core projects will be removed in Snapcraft 5.0 (expected July 22, 2021)

Ported from the legacy documentation.

Regarding DN7 - the ‘prepare’ keyword can also be replaced with override-pull depending on your requirements.

thanks for the info! I’ll add it here and a note on the notification page.

Propose adding dn10: deprecating the use of version-script.

It’s strongly recommended to either set version directly, else use adopt-info with snapcraftctl set-version part scriptlet for cases where it is to be dynamically generated.

The snapcraft PR to add it: https://github.com/snapcore/snapcraft/pull/2639/files

1 Like

Thanks for the heads-up - I’ll track the PR and add accordingly.

1 Like