-
Notifications
You must be signed in to change notification settings - Fork 2
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 generate .gitignore
and .prettierignore
files (or offer option to disable generation)
#189
Comments
Hi Felix,
Given point 3, I suspect that the configuring manual updates of the gitignore file will not be used by users, and we should not offer it to avoid effort in customer support on our side. PS Towards the end of the year you won't need to store an inlang directory in git anymore. More info coming soon. |
Hi Samuel, thank you for your quick response. Maybe my remark at the end is confusing you (sorry if that was the case). I was talking about the JS files generated by Paraglide (i.e. the ones in the |
Ah. I let @loris.sigrist take over. Out of my head: the same problem of potential merge conflicts arises though, doesn't it?
|
The compiled output should stay the same, unless the source (the translation files) are changed. So there would only be a conflict if the translation files or Paraglide were updated. In the first case you would have a merge conflict either way. Having the generated JS checked in guarantees that files shipped in production are exactly the same as in CI, testing, etc. |
Dont' you have that guarantee already by checking in the source translation files and pinning the paraglide version? It seems like you would double-track changes to translations, which leads to two merge conflicts that should be one. The merge conflicts in the compiled messages can't even be resolved because they depend on the translation source files. If the translation source files and compiled message output are resolved differently, the compiled output does not equal the input. The result will be bugs or unexpected behaviour. |
@felix-roehrich @samuelstroschein, what do you think of generating/modifying the |
@loris.sigrist i would add a config property to the compiler
It avoids merge conflicts. |
@samuelstroschein I believe you are overestimating the amount of merge conflicts happening. That said, this is based on our current experiences which does not include translations, so it may turn out that in this case this policy is unsustainable. As for the double tracking let me make the following comparison (although it's not perfect): If you add a package with
Sounds pretty similar to my arguments, right? So your argument in this case would be that it is sufficient to pin all the versions in Overall you don't need a lockfile and it usually doesn't make in difference, but you still use one. So why shouldn't one check in generated source code? |
Yes, if you pin your versions ;) Package managers don't pin exact versions by default, though. NPM uses SemVer aka PS let's add |
@felix-roehrich is this still a feature you request? otherwise, I'll close the issue till more users request it |
I don't need it urgently, since I can work around it. It's more of an annoyance, so feel free to prioritize other things. |
Roger. I am going to expose the compiler as a library with v2. You will able to adapt the compiled output to your needs |
Will be releases as part of Paraglide JS 2.0 #201 |
Hey,
we tried out Paraglide and had an overall great experience, but we are currently put off by the fact that
.gitignore
and.prettierignore
are generated on every compile. This clashes with our internal policy of committing generated source code to the repository. We do this for the following reasons:We believe it would be nicer for consumers if the setup only suggested to update the
.gitignore
and.prettierignore
files (which probably already exist on a repository/package level) and left the final decision to the developer.Alternatively, an option to disable the generation would also be fine.
(As an aside, we were also surprised that
.inlang
is not a valid name for the project folder, since it common have config dirs be named.[tool]
.)The text was updated successfully, but these errors were encountered: