cargo: Generate a Cargo.lock if one wasn't found
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- build-system
Research direction
Start by reading the existing cargo plugin and the linked specification for issue 42. Trace the track, fetch, and stage flows, then verify the generate_lock modes, default behavior, and error case described here; done means Cargo.lock generation and dependency reconstruction follow the stated rules.
Written by the indexing model from the issue text.
Description
Spec from https://gitlab.com/BuildStream/bst-plugins-experimental/-/issues/42
Will behave like this:
track: Cargo.lock will be generated by the host'scargoIF(generate_lock is true)OR(generate_lock is 'if-missing' and Cargo.lock doesn't exist). If generate_lock is false and Cargo.lock doesn't exist, raise an error. Then the existing logic for tracking cargo sources will happen. The ref will now encode everything necessary to reconstruct the vendored libraries, so the generated Cargo.lock is discardedfetch: The sources are fetched according to the ref, as they are nowstage: The sources are staged according to the ref, as they are now- Buildstream will default to
generate_lock: false, and projects can (if they wish) globally override that default togenerate_lock: if-missingto make thecargoplugin work in all scenarios. Thengenerate_lock: truecan be used if Cargo.lock needs to be overwritten/ignored for whatever reason (i.e. a hypothetical repo that hasn't been updated in a while and Cargo.lock specifies dependencies w/ known security issues, so you want to force it to use newer libraries) - If a project doesn't want to grow a dependency on
cargofrom the host totrack, it can keepgenerate_lock: falseas the default, and then maintain its own Cargo.lock files & stage them before thecargosource:
sources:
- kind: git_tag
url: whatever:foobar.git
- kind: local
path: files/cargo/foobar/Cargo.lock
- kind: cargo
generate_lock: false # <-- from project defaults
- Dominant language
- Python
- Stars
- 8
- Forks
- 16
- Avg merge
- 36m
- Merged PRs (30d)
- 2
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/buildstream-plugins
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
apache/buildstream-plugins#110 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
apache/buildstream-plugins#108 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
All issues in apache/buildstream-plugins
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100