[RFC] Explicitly define in glide.lock if base package is a dependency. #314
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.
Working on https://github.com/sgotti/glide-vc I noticed that, using the glide.lock file, it's not possible to determine if a base package with some subpackages is itself a project dependency.
For example, given:
I'm not able to determine if only
github.com/sgotti/project01/subpackages01
or alsogithub.com/sgotti/project01
are needed packages.One of the idea that came to my mind was to explicitly add "." to the subpackages if the base package is a dependency. This is what the actual PR does to trigger an initial discussion.
This of course will make the lock file slightly more verbose since every package will have a subpackage section. An improvement to make it less verbose will be to add "." only if there're other subpackages (so if only the base package is needed, no subpackage with just "." will be added).