-
Notifications
You must be signed in to change notification settings - Fork 279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
modules: copy LICENSE files from VCS root into modules #3130
Labels
FeatureRequest
New feature or request
modules
Issues related to CUE modules and the experimental implementation
Comments
myitcv
added
FeatureRequest
New feature or request
modules
Issues related to CUE modules and the experimental implementation
labels
May 8, 2024
cueckoo
pushed a commit
that referenced
this issue
Jun 3, 2024
Including LICENSE files from the root of a VCS repo in the case where no LICENSE file is present in a subdirectory module requires that we perform all operations from the module root. We prepare for this by making ListFiles and Status take paths instead of implicitly operating on the module subdirectory. This allows us to perform separate checks on the root LICENSE file if one exists. Indeed the concept of a VCS implementation keeping track of a subdir is eliminated entirely. As part of this we expand the VCS test suite to include a number of scenarios that cover the "edges" of ListFiles and Status. We also fix a bug in passing where git ListFiles implementation did not correctly handle an empty result, i.e. the situation where no files match args. For #3130. Signed-off-by: Paul Jolly <[email protected]> Change-Id: Id669490a447a4f07ced611f3323868b4519b1919
cueckoo
pushed a commit
that referenced
this issue
Jun 3, 2024
When a module in a subdirectory of a repo controlled by VCS does not include a LICENSE file, include the LICENSE file from the repo root if one exists (and is "clean" with respect to VCS). We also extend the test go publish with git to include a check that a VCS root LICENSE file is only included when it is clean with respect to the current commit. Fixes #3130. Signed-off-by: Paul Jolly <[email protected]> Change-Id: I872310ac3f3ce429917f50aa87395a7b524f0c06
cueckoo
pushed a commit
that referenced
this issue
Jun 3, 2024
When a module in a subdirectory of a repo controlled by VCS does not include a LICENSE file, include the LICENSE file from the repo root if one exists (and is "clean" with respect to VCS). We also extend the test go publish with git to include a check that a VCS root LICENSE file is only included when it is clean with respect to the current commit. Fixes #3130. Signed-off-by: Paul Jolly <[email protected]> Change-Id: I872310ac3f3ce429917f50aa87395a7b524f0c06
cueckoo
pushed a commit
that referenced
this issue
Jun 3, 2024
Including LICENSE files from the root of a VCS repo in the case where no LICENSE file is present in a subdirectory module requires that we perform all operations from the module root. We prepare for this by making ListFiles and Status take paths instead of implicitly operating on the module subdirectory. This allows us to perform separate checks on the root LICENSE file if one exists. Indeed the concept of a VCS implementation keeping track of a subdir is eliminated entirely. As part of this we expand the VCS test suite to include a number of scenarios that cover the "edges" of ListFiles and Status. We also fix a bug in passing where git ListFiles implementation did not correctly handle an empty result, i.e. the situation where no files match args. For #3130. Signed-off-by: Paul Jolly <[email protected]> Change-Id: Id669490a447a4f07ced611f3323868b4519b1919 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1195548 Unity-Result: CUE porcuepine <[email protected]> TryBot-Result: CUEcueckoo <[email protected]> Reviewed-by: Daniel Martí <[email protected]>
cueckoo
pushed a commit
that referenced
this issue
Jun 3, 2024
When a module in a subdirectory of a repo controlled by VCS does not include a LICENSE file, include the LICENSE file from the repo root if one exists (and is "clean" with respect to VCS). We also extend the test go publish with git to include a check that a VCS root LICENSE file is only included when it is clean with respect to the current commit. Fixes #3130. Signed-off-by: Paul Jolly <[email protected]> Change-Id: I872310ac3f3ce429917f50aa87395a7b524f0c06
cueckoo
pushed a commit
that referenced
this issue
Jun 4, 2024
When a module in a subdirectory of a repo controlled by VCS does not include a LICENSE file, include the LICENSE file from the repo root if one exists (and is "clean" with respect to VCS). We also extend the test go publish with git to include a check that a VCS root LICENSE file is only included when it is clean with respect to the current commit. Fixes #3130. Signed-off-by: Paul Jolly <[email protected]> Change-Id: I872310ac3f3ce429917f50aa87395a7b524f0c06
cueckoo
pushed a commit
that referenced
this issue
Jun 4, 2024
When a module in a subdirectory of a repo controlled by VCS does not include a LICENSE file, include the LICENSE file from the repo root if one exists (and is "clean" with respect to VCS). We also extend the test go publish with git to include a check that a VCS root LICENSE file is only included when it is clean with respect to the current commit. Fixes #3130. Signed-off-by: Paul Jolly <[email protected]> Change-Id: I872310ac3f3ce429917f50aa87395a7b524f0c06
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
FeatureRequest
New feature or request
modules
Issues related to CUE modules and the experimental implementation
When a module is published from a
source: kind: "git"
setup, and the module is not at the root of the repository, it is a reasonable expectation that theLICENSE
file at the root of the repository be included as a published artefact in the module which is rooted at a sub directory. Otherwise, there would be a needless maintaining of twoLICENSE
files: one at the root, and a presumably identical one in the sub directory.Go follows a similar approach, including the root
LICENSE
file in a sub directory module if one does not exist (in the sub directory).This issue captures implementing this behaviour.
We also need to print the included license file in the output of
--dry-run
.The text was updated successfully, but these errors were encountered: