Skip to content
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

Feature request: interface for updating Compat.toml in a registry #32

Open
tkf opened this issue Apr 19, 2020 · 3 comments
Open

Feature request: interface for updating Compat.toml in a registry #32

tkf opened this issue Apr 19, 2020 · 3 comments

Comments

@tkf
Copy link

tkf commented Apr 19, 2020

Continuing discussion in JuliaRegistries/General#5098 and JuliaLang/Pkg.jl#1492:

I find manually updating Compat.toml is hard and rather scary as it's error-prone, especially because Compat.toml does some kind of "compressing" (or generating reverse dict or something?). It would be nice to have an automated tool to introduce new bounds in Compat.toml.

@GunnarFarneback
Copy link
Collaborator

The only challenge here is designing the interface of the tool. After that it's little more than

compat = Compress.load(compat_filename)
[modify the compat dict as desired]
Compress.save(compat_filename, compat)

Do you have ideas how you would want to specify the compat changes?

@StefanKarpinski
Copy link
Contributor

That's the API I had in mind when I implemented those functions: load, modify, save. In the middle you have a plain dict from versions to properties (deps, compat, etc.) that you can modify however you want.

@tkf
Copy link
Author

tkf commented Apr 22, 2020

I think it'd be nice to list them in public API by documenting them. In particular, it'd be nice if Compress.save (and even Compress.load) can have a wide contract API; i.e., it is documented to work with any kind of input and properly reject ill-formed inputs.

In terms of the UI, I think it'd be nice to also have Compress.recompress(compat_filename) which loads possibly ill-formed Compat.toml, verify it, re-compress it if there are some redundancies, and then save it back to the original file (if it is implementable). Options like preview to show the file content before save it would be nice. This way, I can manually edit the Compat.toml and let Compress.recompress verify and re-compress the file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants