When I upgrade an existing project with jhipster command, a diff tool command line program is used to compare files to find the difference(s).
Like that :
? Overwrite pom.xml? (ynaxdH)
This diff tool used to refresh the differences everytime the user press d key.
This is not the case, as of jhipster v6.7.0.
Sometime you want to manually correct the difference in your file and to check if everything is ok you use the embedded diff tool.
Upgrade an existing jhipster project using the new v6.7.0. In a file where there is changes, press d. Manually change a line and press d again. The diff is NOT reflecting the changes.
v6.7.0
OS : Windows 10
Command line : cmd.exe
This is something provided directly by yeoman, it is not provided by JHipster.
Not sure we can do something on our side...
Looks like you are using jhipster upgrade. Correct?
Its all git magic. There is nothing we can do.
@mshima : I don't think so. I think @unknownboy used simply jhipster command and saw the prompt ? Overwrite pom.xml? (ynaxdH) ; then, he tried to modify manually the diff but Yeoman still compared to the file which is in memory, not the new one
@mshima : I don't think so. I think @unknownboy used simply
jhipstercommand and saw the prompt? Overwrite pom.xml? (ynaxdH); then, he tried to modify manually the diff but Yeoman still compared to the file which is in memory, not the new one
Yep, exactly.
What was jhipster version with this old behavior?
Release 6.5.1 fore sure but I guess v6.6.0 had it too.
This is related to yeoman.
But it shouldn't had any behavior change on yeoman part too.
This is where diff is chosen:
https://github.com/yeoman/generator/blob/668d91fbcab5ec1cf801317e6676bccab24e559d/lib/util/conflicter.js#L311
The file should be loaded just before printing the diff:
https://github.com/yeoman/generator/blob/668d91fbcab5ec1cf801317e6676bccab24e559d/lib/util/conflicter.js#L136
Looks like a cache problem to me.
It shouldn't be difficult to add an option to reload the file, but I don't think it will help if there is a cache problem.
You can post a feature request there.
This is not related to jhipster.
If you want to move this conversation forward, post it in https://github.com/yeoman/generator/issues
I can handle from there.
Closing