Closed l7777777b closed 4 years ago
This error cause, Indonesian language change from id to in. See in yo.rc. it's still id.
"languages": [ "id", "zh-cn", "zh-tw", "en" ]
Yes, that's why i think its not a proper upgrade if we need to manually edit that file before doing the upgrade, especially there's no specific announcement about this change and the effect on upgrade. The jhipster upgrade command should've done everything automatically.
There are/were a lot of problem with the upgrade sub generator.
So honestly, I don't know what to do with this sub gen and with this ticket
I love the idea behind it and I’ve used it with success myself. As a sponsor, I’d like to see more bug bounties geared towards it.
On Jun 14, 2019, at 12:33 PM, Pascal Grimaud notifications@github.com wrote:
There are/were a lot of problem with the upgrade sub generator.
It was coded by someone who didn't contribute to the project any more It is not tested in our CI as it is too specific and really hard to test each release, we have some bug with it I already suggested to delete this sub generator but some users want to keep it It probably works well for little project, or POC. But for big projects, I personnaly recommand to not use it So honestly, I don't know what to do with this sub gen and with this ticket
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jhipster/generator-jhipster/issues/9908?email_source=notifications&email_token=AAAELZDARNDY2TD5KAIDV5DP2PW65A5CNFSM4HXWZEY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXXYH6Y#issuecomment-502236155, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAELZHG4NO7NDSEVIW7643P2PW65ANCNFSM4HXWZEYQ.
Yes agree with you Matt about the value of this. That's why I think it should go to a separate project, as the upgrade sub gen is simply a list of git commands. It can be replaced by a SH or Bash, and should not depend on a specific version of JHipster release.
Like this, we can't do anything until the next release. And if we manage to find a fix, after a new release, we can't know if it will work well.
The best should be to go to a specific project to not rely on JHipster releases
I personally use (including on big projects) and like the upgrade subgen. I think its place is here, in generator-jhipster where it provides a lot of value, and is well integrated with jhipster, including blueprints.
However this subgenerator is not magic. It can't deal with all breaking change. And c67d8aeeffdabc130e13a726fd5e14f6fbf5e0e5 is such a breaking change. I'm afraid there's nothing we can do right now easily.
We have a cleanup mechanism (that is currently not related to upgrade
) that coud be used to deal with such changes, however I wonder how it's supposed to work. Indeed it doesn't really work as previously analyzed, since it seems that the .yo-rc.json is updated before the cleanup code run.
May it would be much neater if its moved to the CLI instead of generator like the import jdl part. Since in CLI we don't have any yeoman limitations and the code can be much simpler. Also once in CLI we can use advanced node features if needed
On Sat, 15 Jun 2019, 4:27 pm Aurélien Mino, notifications@github.com wrote:
I personally use (including on big projects) and like the upgrade subgen. I think its place is here, in generator-jhipster where it provides a lot of value, and is well integrated with jhipster, including blueprints.
However this subgenerator is not magic. It can't deal with all breaking change. And c67d8ae https://github.com/jhipster/generator-jhipster/commit/c67d8aeeffdabc130e13a726fd5e14f6fbf5e0e5 is such a breaking change. I'm afraid there's nothing we can do right now easily.
We have a cleanup https://github.com/jhipster/generator-jhipster/blob/master/generators/cleanup.js mechanism (that is currently not related to upgrade) that coud be used to deal with such changes, however I wonder how it's supposed to work. Indeed it doesn't really work as previously analyzed https://github.com/jhipster/generator-jhipster/issues/9204#issuecomment-461074682, since it seems that the .yo-rc.json is updated before the cleanup code run.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jhipster/generator-jhipster/issues/9908?email_source=notifications&email_token=AAIOKF3MDUMNSGEFXMPQIADP2T35VA5CNFSM4HXWZEY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXYZH6Q#issuecomment-502371322, or mute the thread https://github.com/notifications/unsubscribe-auth/AAIOKF5ZF7CD2MLKL3LIGCDP2T35VANCNFSM4HXWZEYQ .
Also agree with @murdos that it is very useful and would vote for it to stay. @deepu105 might also be right that moving it to CLI could make it easier to maintain. What I think is missing here currently, in order to support such use cases, is a step for executing pre-upgrade tasks. So before re-generating the app using the latest version we should have updated the .yo-rc.json
file accordingly.
Yes, I know a lot of people want to keep it. That's why we should find an official maintainer for this
I propose we first move it to CLI and simplify a bit
Thanks & Regards, Deepu
On Tue, Jun 18, 2019 at 6:31 PM Pascal Grimaud notifications@github.com wrote:
Yes, I know a lot of people want to keep it. That's why we should find an official maintainer for this
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jhipster/generator-jhipster/issues/9908?email_source=notifications&email_token=AAIOKF5U64X7DOJJ5AWWSO3P3EEWFA5CNFSM4HXWZEY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODX7GT6Q#issuecomment-503212538, or mute the thread https://github.com/notifications/unsubscribe-auth/AAIOKF32IZAPNFBFHA3GB6DP3EEWFANCNFSM4HXWZEYQ .
So can I assign the ticket to one of you ? @pvliss or @murdos ?
I can give it a shot, except if @murdos wants to do it.
@pvliss : you can go ahead, I don't have time to work on it currently
@pvliss : FYI, just added a bounty on this
Thanks @pascalgrimaud. I have alredy done some work related to this in #10037(needs conflict resolution) and more specifically in commit https://github.com/jhipster/generator-jhipster/pull/10037/commits/69b5a027f1360cc5cd2a60ca88a6d1677300a9d2.
Although with the fix #10226 provided by @kaidohallik maybe we could move this pre-upgrade logic into the language sub-gen itself. Will need to check. The only problem I can think of right now is that a change is needed in the config file before actual generation and we need to check if the languages config array is used before the language sub-gen is invoked.
@kaidohallik are you interested in checking this since you also fixed #10226?
Somehow I totally missed this issue. The reason I changed the locale name was because of a bug in Java specifically related to parsing the correct indonesian locale (see: https://github.com/jhipster/generator-jhipster/issues/9494#issuecomment-480386162 and https://bugs.openjdk.java.net/browse/JDK-6457127). This is a super specific bug and IMO not worth fixing. Also it looks like the discussion moved away from the Original Poster's bug. So IMO we should close this issue.
@PierreBesson Guess you are right. Not many users should stubmle on this so not sure if its worth the effort and the manual fix is easy as well. Only thing is the end-user experience when upgrading as this change was between minor versions.
It is opened since 4 months. How can we advance on this ticket ? cc @pvliss @murdos ?
Closing this as it is opened for too long. And as Pierre said, the discussion moved away from the Original Poster's bug.
Overview of the issue
jhipster upgrade
command failed for project with indonesian language generated before version v6.1.0related to this: https://github.com/jhipster/generator-jhipster/issues/9494 https://github.com/jhipster/generator-jhipster/pull/9722/commits/c67d8aeeffdabc130e13a726fd5e14f6fbf5e0e5
stacktrace:
Motivation for or Use Case
cannot update project to v6.1.0
Reproduce the error
jhipster upgrade
Suggest a Fix
I haven't going through the code, but i assumed it's caused by there's no trace of "id" since all of it was replaced to "in" on v6.1.0 release. It should've still recognized the "id" while upgrading for backward compatibility, and replace it to "in" after everything is completed.
Replacing the existing language json config manually to "in" after the error and do another jhipster upgrade cause another local changes error because of previous partially updated files, so i must delete node_modules directory and use
jhipster
command to do the upgrade.JHipster Version(s)
JHipster configuration
JHipster configuration, a
.yo-rc.json
file generated in the root folder.yo-rc.json file