-
Notifications
You must be signed in to change notification settings - Fork 56
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
Force check i18n cache when cleaning project #4474
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix here, @fluiddot!
The test cases worked properly on my machine; however, the npm run bundle
command fails when the bundle is not present. For example:
rm -rf bundle
npm run bundle
fails (I unfortunately didn't capture the error, but will add it here if I get the chance to re-run today).
Since this fixes the most common case where a bundle exists and it is re-generated, I think it's good to approve and merge, which I'll do now.
@guarani I think removing the |
It's my understanding that It's often the case when debugging an issue that we delete build artifacts, derived data, etc and I think that includes the bundle. (The only reason I'm aware of that we check-in the bundle is because we don't want the main apps to have the tooling needed to build it.) If for example, I had an issue where the main apps didn't seem to pick up an updated bundle, personally I probably would delete the bundle and generate it again to make sure nothing was being cached. If I was unaware of how |
Do you happen to know why the bundle command would require an existing bundle? |
Ok, I see your point and totally agree with the fact that deleting the bundle shouldn't produce issues on the generation command, as it's an artifact only required by the integration with the main apps 👍 . In fact, I don't think that the bundle or any asset file contained within that folder (i.e. |
Looks like it's failing in the scripts that generate the localization strings files (reference). However, the cause is just the fact they expect the |
Thanks for pinpointing the cause there 🙇
Sure, will take a look, thanks! |
Following up #4469, this PR includes the command
npm run i18n:check-cache
in i18n cache cleaning command (npm run clean:i18n
). This way we assure that the i18n cache is always present, which is required for generating the JS bundle.Thanks @guarani for spotting this and suggestion the change in #4469 (comment) 🙇 .
To test
Clean command recreates i18n cache
npm run clean
.src/i18n-cache
is removed when the command is being executed.src/i18n-cache
is created again.JS bundle is generated properly
npm run bundle
.PR submission checklist: