-
Notifications
You must be signed in to change notification settings - Fork 164
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
Do not delete generated package.json on mvn clean #6151
Comments
I agree, the npm install should be run only when the There are couple of reasons to avoid
|
I don't like the first suggested solution of putting the generated Another way of fixing this would be to update all starters to exclude that particular file from Storing a copy of the file or a hash of the contents in Storing a hash as a "version number" in the entry in the main |
First, thanks for investing this "speed issue". I am the one which reported this (along with #6150) via vaadin.com support portal.
Please correct me, but at the moment there is already a generated file I know npm and the vaadin-maven-plugin too little, but Just my 2 cents. [1] https://vaadin.com/docs/v14/flow/v14-migration/v14-migration-guide.html |
While it's technically possible to have the internally generated For that reason, we would like to find a solution that can have the file in some other location. |
If you have two |
As the contents for the folder |
On my machine, the contents aren't copied but instead, |
Right. Also on windows its apparently a JUNCTION and not an actual copy. |
Acceptance criteria:
|
Stores hash of the generated package json file in the main package json (inside node_modules, outside target folder) and updates it every time when the generated content is changed. TaskUpdatePackages modified status is changed only if the hash value is changed. It allows do not run npm install even if the generated package.json file is regenerated. Fixes #6151
As a workaround, you can configure |
…ged (#6385) Stores hash of the generated package json file in the main package json (inside node_modules, outside target folder) and updates it every time when the generated content is changed. TaskUpdatePackages modified status is changed only if the hash value is changed. It allows do not run npm install even if the generated package.json file is regenerated. Fixes #6151
The merged patch is not enough to fix this issue because the ordering inside |
That means that acceptance criteria is not correct. |
When hashing sort dependencies so we only flag modified if dependencies have changed. Closes #6151
This is still not resolved properly, even though it's slightly less obvious now. I don't know exactly what goes on, but doing
After this setup, the situation is thus emulating what would have happened if version 1.3.0 would have been recently released. In this situation, doing |
In fact, the only thing that is relevant for this ticket is the very last detail that EDIT: Separate issue created for preserving the installed |
The current problem is that we do clean up because we see that the shrinkwrap version has changed. |
|
The problem is that when we clean the version is lost and when we check in package-lock.json we look for |
Fix getting shrinkwrap version from package-lock.json fixes #6151
So it was just a typo, my bad. |
Fix getting shrinkwrap version from package-lock.json fixes #6151
Great. Now it seems to work even in my sneaky case. Let's just remember that there are (at least) three different patches that need to be cherry picked for this issue. |
Yes, that's the trickiest thing. |
…ged (#6385) Stores hash of the generated package json file in the main package json (inside node_modules, outside target folder) and updates it every time when the generated content is changed. TaskUpdatePackages modified status is changed only if the hash value is changed. It allows do not run npm install even if the generated package.json file is regenerated. Fixes #6151 (cherry picked from commit d887d09)
…ged (#6385) Stores hash of the generated package json file in the main package json (inside node_modules, outside target folder) and updates it every time when the generated content is changed. TaskUpdatePackages modified status is changed only if the hash value is changed. It allows do not run npm install even if the generated package.json file is regenerated. Fixes #6151 (cherry picked from commit d887d09)
For various reasons, you run
mvn clean package
on your project instead ofmvn package
. This might be to update dependencies and remove old ones, to make sure code is re-generated or whatever other reason.When doing
mvn clean package
,npm install
is triggered even though the generatedpackage.json
has not been updated. Because the generated file is stored intarget
, it is removed bymvn clean
and comparing the newly generated one to the existing one does not work.This should be solved so
mvn clean package
does not need to runnpm install
.Potential solutions:
package.json
out oftarget
so it is not removed. E.g. use the samewebpack.config.js
+webpack.generated.js
pattern and name it/package.generated.json
package.json
contents somewhere else for comparison purposes, e.g. main package.jsonThe text was updated successfully, but these errors were encountered: