#1965: improve dependent installations#2016
Conversation
Coverage Report for CI Build 27812007724Coverage increased (+0.007%) to 71.388%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions2 previously-covered lines in 2 files lost coverage.
Coverage Stats💛 - Coveralls |
laert-ll
left a comment
There was a problem hiding this comment.
I want to make sure I understand the scope correctly: the issue description gave me the impression that the fix was supposed to be on a bigger scale (using the parent install request so loops get detected on their own). So is it intentional to use the skipInstallation as a workaround or am I missing something?
Also it might be a good idea to add some tests for this as well.
Everything works well, the issue is solved in a simple way and removes the problem, thanks for your work!
There was a problem hiding this comment.
Is there any particular reason why Pip doesn't override isSkipInstallation() in the same way that Npm does?
There was a problem hiding this comment.
because i didn't found a loop dependency that can occurs in pip context.
There was a problem hiding this comment.
regarding tests i will add some junit tests in NgTest and NestTest
There was a problem hiding this comment.
so after checking the tests again before the fix i see this
Deleting target\ide-projects\nest ...
Starting to copy src\test\resources\ide-projects\nest recursively to target\ide-projects\nest
No CVEs found for version 11.0.21 of tool nest.
Tool nest has 0 other tool(s) as dependency
Installation from <none> to nest@11.0.21.
No CVEs found for version 9.9.2 of tool npm.
Tool npm has 1 other tool(s) as dependency
Tool node not installed in C:\Users\projects\IDEasy\workspaces\main\IDEasy\cli\target\ide-projects\nest\project\software\node
Tool node not installed in C:\Users\projects\IDEasy\workspaces\main\IDEasy\cli\target\ide-projects\nest\project\software\node
No CVEs found for version v18.19.1 of tool node.
Tool node has 0 other tool(s) as dependency
Installation from <none> to node@v18.19.1.
Could not find version v18.19.1 so using 'default' for node/node
Resolved version v18.19.1 to version v18.19.1
Trying to download node-v18.19.1.tgz from http://localhost:57896/download/node/node/v18.19.1/node-v18.19.1.tgz
Content-Length was not provided by download from http://localhost:57896/download/node/node/v18.19.1/node-v18.19.1.tgz
No checksum found for C:\Users\projects\IDEasy\workspaces\main\IDEasy\cli\target\ide-projects\nest\_ide\tmp\Downloads\node-v18.19.1.tgz
Extracting TAR file C:\Users\projects\IDEasy\workspaces\main\IDEasy\cli\target\ide-projects\nest\project\home\Downloads\ide\default\node-v18.19.1.tgz to C:\Users\projects\IDEasy\workspaces\main\IDEasy\cli\target\ide-projects\nest\_ide\tmp\extract-node-v18.19.1.tgz
Installed node in version v18.19.1 at C:\Users\projects\IDEasy\workspaces\main\IDEasy\cli\target\ide-projects\nest\project\software\node
Installation from <none> to node@v18.19.1.
BASH_PATH environment variable was not found
A proper bash executable was found in your PATH environment variable at: C:\Program Files\Git\usr\bin\bash.exe
Running command 'C:\Users\projects\IDEasy\workspaces\main\IDEasy\cli\target\ide-projects\nest\project\software\node\npm' using bash with arguments 'config' 'set' 'prefix' 'C:\Users\projects\IDEasy\workspaces\main\IDEasy\cli\target\ide-projects\nest\project\software\node' ...
npm config set prefix C:\Users\projects\IDEasy\workspaces\main\IDEasy\cli\target\ide-projects\nest\project\software\node
Setting npm config prefix to: C:\Users\projects\IDEasy\workspaces\main\IDEasy\cli\target\ide-projects\nest\project\software\node was successful
Successfully installed node in version v18.19.1 at C:\Users\projects\IDEasy\workspaces\main\IDEasy\cli\target\ide-projects\nest\project\software\node
Installation from <none> to npm@9.9.2.
Running command 'C:\Users\projects\IDEasy\workspaces\main\IDEasy\cli\target\ide-projects\nest\project\software\node\npm' using bash with arguments 'install' '-gf' 'npm@9.9.2' ...
npm install -gf npm@9.9.2
Installation from <none> to npm@9.9.2.
Successfully installed npm in version 9.9.2 at C:\Users\projects\IDEasy\workspaces\main\IDEasy\cli\target\ide-projects\nest\project\software\node
Running command 'C:\Users\projects\IDEasy\workspaces\main\IDEasy\cli\target\ide-projects\nest\project\software\node\npm' using bash with arguments 'install' '-gf' '@nestjs/cli@11.0.21' ...
npm install -gf @nestjs/cli@11.0.21
Installation from <none> to nest@11.0.21.
Successfully installed nest in version 11.0.21 at C:\Users\projects\IDEasy\workspaces\main\IDEasy\cli\target\ide-projects\nest\project\software\node
so the loop of dependency of node and npm is not present in the tests (maybe because of the resources we are using)
This PR fixes #1965
Implemented changes:
NpmBasedCommandletinstalled-version checks now callrunPackageManager(request, true)which preventsnpm list -g <package> --depth=0from recursively triggeringnpm.install.PipBasedCommandletTesting instructions
For the test you can use Intellij directly by running
com.devonfw.tools.ide.cli.Ideasywithinstall <Tool>as arguments or using GraalVM and the call the created ideasy.exe withinstall <Tool>Checklist for this PR
Make sure everything is checked before merging this PR. For further info please also see
our DoD.
mvn clean testlocally all tests pass and build is successful#«issue-id»: «brief summary»(e.g.#921: fixed setup.bat). If no issue ID exists, title only.In Progressand assigned to you or there is no issue (might happen for very small PRs)with
internal