-
Notifications
You must be signed in to change notification settings - Fork 108
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
[node] support git sources in lockfile v2 format #382
base: master
Are you sure you want to change the base?
Conversation
I think this has some overlap with #351 😅 see the discussion there. |
Attempting to use this for the Stretchly flatpak, and I get the following error when building:
|
There's something up with the paths here:
...but later the jq is looking in
Not sure where that |
That's a thing on Fedora rpm-ostree systems. |
The manifest and everything can be found in this MR. |
Thanks, I'll take a look. |
Ok a few things going on here:
|
I've changed that order. |
@jwillikers that's the structure from I've tried in the past to remove 2 package structure, as they say it's not needed anymore but it did not work for me. |
Ok I've added support for these 'shortcut' git urls to the PR. But we still need to overcome the 2 package structure in stretchly somehow. |
@Ian2020 should I try to remove 2package structure? It's been some time since last time I tried so I can try again if that helps |
@hovancik yes I think that would be simplest if you can, thanks. |
@Ian2020 done, new version is out. |
@Ian2020 actually scratch that, it does not work, will need to look into this more. |
Ok, despite that I can now successfully build Stretchly v1.15.1 as a flatpak. I created So I think this PR is doing what it should do for Stretchly to build as a flatpak, I hope you can sort the other issues in Stretchly. Let me know if you think there's anything more needed here. |
@Ian2020 One thing, I noticed that running |
@Ian2020 can you possibly try with this PR? hovancik/stretchly#1401 Seems like it was local issue only but would be nice to confirm build is ok after this change |
@hovancik I just tested it and that commit builds and runs fine. |
Thanks, we are all good then, I guess. |
As part of the update, I had to refactor quite a bit of how the build process works. flatpak-node-generator is quite bugged: - Output `generated-source.json` expects the package to be in the main directory, so I've split the build into modules but still had to add `flatpak-node` exclusion to build - I had to patch locally flatpak/flatpak-builder-tools#382 and use that because flatpak/flatpak-builder-tools#381 - I've also run into flatpak/flatpak-builder-tools#377 I've also: - Made copying of addr2line dependencies more reliable - Merged the startup scripts into one - Added permission and setup for discord so that rich presence works
As part of the update, I had to refactor quite a bit of how the build process works. flatpak-node-generator is quite bugged: - Output `generated-source.json` expects the package to be in the main directory, so I've split the build into modules but still had to add `flatpak-node` exclusion to build - I had to patch locally flatpak/flatpak-builder-tools#382 and use that because flatpak/flatpak-builder-tools#381 - I've also run into flatpak/flatpak-builder-tools#377 I've also: - Made copying of addr2line dependencies more reliable - Merged the startup scripts into one - Added permission and setup for discord so that rich presence works
As part of the update, I had to refactor quite a bit of how the build process works. flatpak-node-generator is quite bugged: - Output `generated-source.json` expects the package to be in the main directory, so I've split the build into modules but still had to add `flatpak-node` exclusion to build - I had to patch locally flatpak/flatpak-builder-tools#382 and use that because flatpak/flatpak-builder-tools#381 - I've also run into flatpak/flatpak-builder-tools#377 I've also: - Made copying of addr2line dependencies more reliable - Merged the startup scripts into one - Added permission and setup for discord so that rich presence works
Hi @hfiguiere. Since you mentioned that you prefer to build from source, could this PR be merged? |
I don't maintain that module and I don't have the knowledge space. |
Co-authored-by: Danilo Bargen <[email protected]>
then | ||
to_entries | map( | ||
if (.value | type == "string") and $data[.value] | ||
then .value = "git+file:\($buildroot)/\($data[.value])" |
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.
Using this fork to update the dependencies for the Stretchly Flatpak resulted in the following error:
npm error code 128
npm error An unknown git error occurred
npm error command git --no-replace-objects ls-remote file:/var/home/jordan/Projects/net.hovancik.Stretchly/.flatpak-builder/build/stretchly-14/flatpak-node/git-packages/dbus-final-3e43f60d80bbcdf0dfa0b59b838097d6af4d17ba
npm error ssh: Could not resolve hostname file: Temporary failure in name resolution
npm error fatal: Could not read from remote repository.
npm error
npm error Please make sure you have the correct access rights
npm error and the repository exists.
I was able to fix this by using the syntax file://
instead of just file:
.
This matches the documented syntax for Git URL's.
then .value = "git+file:\($buildroot)/\($data[.value])" | |
then .value = "git+file://\($buildroot)/\($data[.value])" |
Fixes #381 and I hope will help #237 and #182.
I've added a new set of tests to cover more types of git references: https and ssh both with a commit hash and without. The tests cover all versions of the lockfile format v1,2,3.
In my testing I found that it doesn't appear to be necessary to patch package-lock.json (npm.py:444), so that has been removed. If there's another reason that is needed let me know but the tests all pass without it.