Skip to content
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

Remove node modules from the repository #108

Merged
merged 5 commits into from
Sep 24, 2024

Conversation

bernarda78
Copy link
Contributor

Hi,

I've worked on #80.

I have removed the node_modules folder from the repository. The depency are now installed during make execution. During this step, a call is made to npm ci which will install package registered in package.json and package-lock.json files.

Why npm rather than yarn ? Both npm and yarn are package manager that use package.json. In both cases, there is the issue of bootstraping. I initially wanted to move with yarn, but npm seemed to be already used to manage the dependency, so I kept to it.

A few things that could be improved:

  • Add a dependency to npm, but may be it could be bootstraped ?
  • There is no check that npm actually exists on the system.
  • npm message at the installation is a bit verbose.
  • There are remaining dependency living in the repository, for the src/webview/client-files/. I have not yet looked how to replace them.

Feel free to ask anything,
Thanks.

Antoine Bernard added 4 commits September 16, 2024 17:43
Both files should always be sync. Should have been done in
commit 376a20a.
As node dependencies are now fetched at installation, we remove
the node_modules folder from the repository and update .gitignore
accordingly.
@svalat
Copy link
Member

svalat commented Sep 17, 2024

Hi @bernarda78, thanks very much for the patch, that's welcome, I will give a look and play a bit with it.

In principle as you applied the same logic than numaprof I should in principle be able to call npm only when using the git repo. When I make a release (I probably need to patch the dev/gen-archive.sh so it make just as numaprof to produce an archive for release which does not require internet. That's important for clusteres who have no access to the net, also to improve reproductibility of the release itself.

Do you have time to look to add a commit in the PR for that ?

You can :

@svalat
Copy link
Member

svalat commented Sep 17, 2024

There is a FindNpm in numaprof which you can import also : https://github.com/memtt/numaprof/blob/master/cmake/FindNpm.cmake

@bernarda78
Copy link
Contributor Author

Thank you for the information. I will look into it and get back to you.

@bernarda78
Copy link
Contributor Author

Hi,

My last commit makes check for npm existence and works with the archive generation script (https://github.com/memtt/numaprof/blob/master/dev/gen-archive.sh).

@svalat
Copy link
Member

svalat commented Sep 24, 2024

I checked, everything looks to work as expected. I merge.

Thanks a lot for the PR.

@svalat svalat merged commit 608effc into memtt:master Sep 24, 2024
1 check passed
@bernarda78 bernarda78 deleted the remove_node_in_repo branch September 25, 2024 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants