← Back to issue list

snapcraft init with parts fails with required options

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1516775
Type
issue
State
closed
Author
~sergiusens
Labels
—
Created
Updated
Closed

Current evaluation

Legacy "snapcraft init <part>" support was removed in commit b0d15b0e9, pending redesign for the new CLI; the maintainer closed the report as intentional.

Resolution: closed superseded

Reason: Commit b0d15b0e9 removed the obsolete part-argument path rather than adding prompts for required options. Maintainer Sergiusens said it would be reintroduced with the redesigned CLI.

Evaluated by: mr-cal-bot

No scores available.

Issue body

When running snapcraft init with a part specified, there's no way right I can see to specify the required options. Rather than prefilling these options with some sort of placeholder, we get an exception: example: $ snapcraft init make Traceback (most recent call last): File "/usr/lib/python3/dist-packages/snapcraft/lifecycle.py", line 65, in init self._load_code(plugin_name, properties) File "/usr/lib/python3/dist-packages/snapcraft/lifecycle.py", line 91, in _load_code options = _make_options(properties, plugin.schema()) File "/usr/lib/python3/dist-packages/snapcraft/lifecycle.py", line 247, in _make_options jsonschema.validate(properties, schema) File "/usr/lib/python3/dist-packages/jsonschema/validators.py", line 432, in validate cls(schema, args, *kwargs).validate(instance) File "/usr/lib/python3/dist-packages/jsonschema/validators.py", line 117, in validate raise error jsonschema.exceptions.ValidationError: 'source' is a required property Failed validating 'required' in schema: {'$schema': 'http://json-schema.org/draft-04/schema#', 'properties': {'source': {'type': 'string'}, 'source-branch': {'default': '', 'type': 'string'}, 'source-tag': {'default': '', 'type:': 'string'}, 'source-type': {'default': '', 'type': 'string'}}, 'required': ['source'], 'type': 'object'} On instance: {} During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/bin/snapcraft", line 33, in snapcraft.main.main() File "/usr/lib/python3/dist-packages/snapcraft/main.py", line 147, in main args.func(args) File "/usr/lib/python3/dist-packages/snapcraft/cmds.py", line 58, in init part = lifecycle.load_plugin(part_name, part_name) File "/usr/lib/python3/dist-packages/snapcraft/lifecycle.py", line 274, in load_plugin return PluginHandler(plugin_name, part_name, properties) File "/usr/lib/python3/dist-packages/snapcraft/lifecycle.py", line 68, in init part_name, e.message)) snapcraft.lifecycle.PluginError: properties failed to load for make: 'source' is a required property -- Imported from https://github.com/ubuntu-core/snapcraft/issues/81

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed superseded Legacy "snapcraft init <part>" support was removed in commit b0d15b0e9, pending redesign for the new CLI; the maintainer closed the report as intentional.
stealth/space-bunny-alpha — closed not a bug Closed as intentional: the legacy snapcraft init <part> path was removed in commit b0d15b0e9, pending redesign for the new CLI.
stealth/space-bunny-alpha — closed stale Migrated to Launchpad bug #1516775. The unsupported `snapcraft init <part>` workflow was later eliminated when part arguments were removed in commit b0d15b0e.
qwen/qwen3.6-35b-a3b — — Running snapcraft init with parts requiring options triggers a jsonschema validation error. The report was closed without comments or documented resolution, indicating it was abandoned or superseded by newer versions.
qwen/qwen3.6-35b-a3b — — A crash occurs when snapcraft init fails due to missing required plugin options. The report was closed without comments or resolution after over ten years, indicating it was abandoned or superseded by newer versions.

Update history

Date Change
created

Related work

  • Related To: canonical/snapcraft#81 (confidence 100%)

    This Launchpad report was imported from GitHub issue canonical/snapcraft#81.

Related issues

Issue Project State Summary Similarity
#81 snapcraft init with parts fails with required options snapcraft closed Migrated to Launchpad bug #1516775; obsolete init part arguments were later removed in commit b0d15b0e.
86%
#1897337 snapcraft build <part> ignores the part snapcraft (launchpad) closed Selective part builds were restored by snapcore/snapcraft#3572, which passed named parts into lifecycle planning instead of building every defined part.
74%
#120 Remove the `parts` arg from `init` snapcraft merged Merged PR #120 removed the unused `parts` argument from `snapcraft init`; a proper implementation was deferred to Snapcraft 2.0.
72%