-
Notifications
You must be signed in to change notification settings - Fork 52
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
Seungheonoh/npm submodule #1460
base: develop
Are you sure you want to change the base?
Seungheonoh/npm submodule #1460
Conversation
Prepare for v5.0.0
5a7373d
to
2cd308c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment
2cd308c
to
a246987
Compare
a246987
to
c41bbe4
Compare
Fixed, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure this is the right usage of linkFarm. cp -r
is still used.
package.json and package-lock.json are expected to be a file to be used in node2nix. Not much can be done here. For other part, I'm not sure if it can be done without it. |
@aciceri bump |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SeungheonOh Only two perplexities:
- what happens if
submodules
is[]
? I guess you do acp <linkFarmOut>/* . -r
where<linkFarmOut>
is an empty folder. If you want you could directly avoid the entire line if there are no submodules - what happens if one wants to use a submodule which is the output of another derivation? For instance consider
submodules = [
(pkgs.runCommand "foo-submodule" {} "mkdir -p $out/foo; magic > $out/foo")
]
The builtins.baseNameOf
this derivation would be foo-submodule
(I believe, haven't tested it). Is this what you want? I would make a test to check if this works.
Moreover I really don't like depending on builtins.baseNameOf
, it looks flaky. But I can't give you any alternative that doesn't imply making the UI more complex:
submodules = [
{
name = "foo";
path = ./foo-submodule;
}
{
name = "bar";
path = mkBarSubmodule { inherit pkgs; src = ./bar-stuff; };
}
]
Said this, if it works it looks good to me, these are improvements that can be made when (and if) these problems arise.
Thanks for the review. I haven't consider using output of derivation as a submodule. Mainly, it was intended for subdirectories. Because I was mainly considering subdirectories, |
@SeungheonOh please implement explicit paths and avoid calling |
Co-authored-by: emiflake <[email protected]>
Can this be merged? Or at least someone pick this up? We're still depending on this branch in several projects. cc: @SeungheonOh, @aciceri |
@klntsky In my opinion it's already mergeable. |
Once again bumping this PR :) |
Closes #1457.
Pre-review checklist
make format
)## Unreleased
header, using the appropriate sub-headings (### Added
,### Removed
,### Fixed
), and the links to the appropriate issues/PRs have been included