Open
Conversation
Add Init() to the Manager interface and CapInit capability. Adds init command definitions to 30 of 36 managers that support non-interactive project initialization. Managers without init: brew, cpanm, gem, maven, pip, sbt (global installers or interactive-only init).
dd18fbc to
3ae4465
Compare
Drops 8 managers and tightens the contract: init must produce a manifest in the working directory, not a child directory. - Move CapInit to end of iota block to preserve existing constant values; add TestCapabilityOrdering to pin them - Drop opam (opam init bootstraps ~/.opam, not a project) - Drop cocoapods (no capabilities section, requires .xcodeproj) - Drop mix/lein/helm/stack/pub/rebar3 (their new commands always create a child directory) - Fix nuget to use bare `dotnet new classlib` (writes to cwd) - Fix shards init (does not take a name argument) - Fix conan to Conan 2 syntax (template first, -d name=, -d version=) - Revert unrelated AddOptions.Version change - Add tests for Init(), Init_NoCommand, Init_RunnerError - gofmt alignment fixes in schema.go and docs/examples 22 managers now support init.
The translator already handles version args (npm uses position 0 with @ suffix to produce lodash@4.17.21, bundler uses --version flag, etc.) but GenericManager.Add never passed opts.Version into input.Args. Needed by git-pkgs/resolve which calls Add with version constraints when building temp projects for resolution.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
Init()to theManagerinterface andCapInitcapability constant. Adds init command definitions to the 22 managers that support non-interactive, in-place project initialization.Each manager uses its native init command (
npm init -y,bundle init,cargo init --lib, etc.) to scaffold a manifest in the current directory.Excluded managers fall into three groups: global installers with no project concept (
brew,gem,cpanm), managers with interactive-only init (maven,pip,sbt), managers whosenewcommand always creates a child directory rather than scaffolding in-place (mix,lein,helm,stack,pub,rebar3), andopamwhoseinitbootstraps~/.opamrather than a project.cocoapodsrequires an existing.xcodeproj.