-
Notifications
You must be signed in to change notification settings - Fork 106
Internalize transcrypt crypt functions #73
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
Conversation
This is meant as a POC as one possible solution to this problem: Several caveats on this at the moment:
It's still possible for the git config expected by transcrypt to drift over time. There should be some functionality that updates the config to handle drift. Maybe some logic that checks git config transcrypt.version, compares it to the user's transcrypt version and updates the config if there's the user is using a newer version? |
Related to #72 |
At the moment, the crypt functions are initialized and permanently set to whatever the version of transcrypt the user is using contains. This means updates to these scripts are never propagated out to existing users. This commit moves the crypt functions into transcrypt itself, which should allow for more transparent updates to the scripts to be propagated out to users.
97708a9
to
a77ca76
Compare
This is just one potential approach, another option is to check git config transcrypt.version on every run, and rerun a subset of save_configuration if the user's transcrypt version is newer. |
It may also make sense to have something like a .transcrypt directory that is saved in the repository, which could save the helper scripts, but also allow them to be consistent between users. |
I'll have to give this one some thought...the original intention was that you wouldn't have to keep The lack of ability to update things automatically is a legitimate concern, but that also means we don't have to bake in knowledge of version checking and compatibility, which could be complex. Breaking changes have only happened once, and it was a major release (2.x) with very explicit instructions on how to handle it. Even if the filters updated transparently, you'd still have to coordinate transcrypt upgrades across users for the repo to be functional for everyone. |
@elasticdog Having the scripts be part of the repository is also a good solution, but with their current home under |
Hi @apeschel I shamelessly stole your approach in this PR with mine in #112 which I have just merged. I didn't find this PR at the time to credit you properly, but ended up re-implementing much of what you proposed here. A key difference of #112 to this one is that the entire I believe the #112 works against your main intention here, which was to make it easier to update transcrypt in repositories by just updating the system-wide transcrypt version. On the bad side, you still need to manually |
@jmurty Looks like a big improvement, and it should fix the issue we were hitting with different users having different version of the crypt functions, even when they had the same version of transcrypt. Thanks! |
At the moment, the crypt functions are initialized and permanently set
to whatever the version of transcrypt the user is using contains. This
means updates to these scripts are never propagated out to existing
users.
This commit moves the crypt functions into transcrypt itself, which
should allow for more transparent updates to the scripts to be
propagated out to users.