-
-
Notifications
You must be signed in to change notification settings - Fork 268
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
transition Pkg.TOML to stdlib/TOML #1011
Comments
I am thinking about making some PRs to https://github.com/wildart/TOML.jl (mainly for some TOML v0.5 features I want to use), but I am wondering whether I should wait with that until the merge is done. Is there an approximate timeline? I could also help with the merge (if the issue is lack of hands, not decisions). |
I don't think any further progress towards the merge has happened. It's on my todo list but not near the top, unfortunately, so any help would be greatly appreciated, as would new features :) |
@wildart, @StefanKarpinski : what would be the preferred way of contributing towards a merge? Eg PRs to Pkg.jl, or to TOML.jl? Small incremental ones (which is what I would prefer) or larger WIP ones? |
👍 |
Ahm, I am a bit confused to be honest. So PRs should be make towards this repository or to |
Either direction is fine, just to get them to converge. You could ask for a particular change. The first step would be to look at a diff of the two packages and try to see what has even diverged. |
Where does this stand at the moment? I see only the first task checked above. This looks like it is within my moderate abilities so I could contribute. How do you suggest I start, having not worked on official packages?
Seems like item 2 could be done at any time--now? Who can do this Let me know: while not hugely important, this is manageable work that could get done soon. |
I note that Pkg.TOML generates errors on any/all floating point values. |
That would be great. I think no further work has been done on this but we still very much want it. |
Update. I have used Pkg/ext/TOML as a base rather than @wildart.TOML. This includes Kristoffer's performance work, bug fixes, updates for Julia 1.0, and previous incorporation of several of @wildart's fixes. I diffed the 3 working files: parser.jl, print.jl, TOML.jl with the latest of @wildart. There are no functionality differences. Most changes in the Pkg version were fixes for Julia > 0.7 and improvements such as replacing abstract types with concrete types. I reviewed the issues in Pkg pertaining to TOML and @wildart's open issues, added a couple of my own--see below. I checked if Pkg.TOML supports TOML 0.4. Thanks to @wildart and Kristoffer's improvements, it does. I made slight changes to the code to simplify it with no functional changes except one bug fix (floating point numbers work). All tests pass, noting that the Pkg tests and @wildart tests might not have been converged yet. Is this worth a pull request and moving to stdlib? Look at the outstanding issues and tell me if they should be addressed. Issues review:
|
Fixed: use symbols as keys in a Dict and TOML.print outputs unquoted keys in the TOML output. |
Nice! |
I will submit a pull request for the changes I've made. I added a test for Dict with symbol keys printed to TOML. Existing tests already covered floating point values. As noted, all the tests pass. This is the first time I've done this: DO point out what I've done wrong. I am sure I made a mistake in runtests.jl. I was loading into the REPL and had the expected name space problem so I changed both the way I use Pkg.TOML and changed a test that functionally passed, but was tripped up by name space collision between Pkg.TOML and base.TOML. This may prevent the revised tests from running. Send me the correction and suggestions. |
Sorry for the past mess. Much progress.
Note: there are now 252 tests. I could not locate the test file you also ran containing 130 or so tests. This must be from the old version of TOML carried around as part of Base??? I think this is accessible in Travis, but I could not find it (even though I enrolled in Travis). I hope that Pkg/ext/TOML/test/runtests.jl should do much better in Travis now. If you point me to the other test file I can either add it as a second test file (which might break the workflow) or--better--add those tests which are not duplicates. Note that the older tests will still reference the method TOML.get. Note there were 2 ways to fix the floating point value bug: either import Base: get so that TOML could add a method. Or get rid of the TOML.get method and then the import is unnecessary. I did the latter. |
I think so, yes. |
If I were to try to add a small feature to the TOML parser (the ability to parse simply |
PR to JuliaStdlibs/TOML. Added the deprecation message to wildart/TOML. |
Is this Julia v1.4 milestone or when should the move be expected? |
When someone does it. Unfortunately, no one has had the bandwidth to work on it. |
|
Has the repo https://github.com/JuliaStdlibs/TOML.jl been moved elsewhere? I get 404. |
Yea, I deleted it. |
Where can it be found now? |
So PRs for TOML.jl this should go to this repository? |
When I updated Pkg/ext/TOML I diffed with @wildart version and there were no functional differences. Seems like the meaningful improvements would be moving to TOML 5.0. One of the official maintainers should decide if it will move to stdlib or stay with Pkg. I am willing then to start on TOML 5.0 with anyone who would like to chip in. |
I would still like to help out. I hope that TOML will be excised to stdlib for 1.5, would be easier to contribute. The full test suite suite ensure that it keeps working for Pkg. |
There is nothing technical blocking this from happening. The wildart TOML and the TOML here should be merged (they might already be pretty much identical), the API should be audited to make sure it looks good (look at how JSON.jl) do it, and then make it an stdlib and then make a PR to Pkg to use the TOML stdlib instead. |
Since we're moving towards vendoring things that Pkg depends on, we should do that here as well. I.e. set it up so that Pkg depends on a snapshot of the official TOML package rather than making TOML a stdlib. I'm happy to do that if someone else gets things to the point where wildart/TOML.jl and this TOML are identical. |
What’s the official TOML package? Should we just start a new one?
- Lewis
|
@wildart/TOML.jl is the registered TOML package. Pkg.TOML is strictly internal to Pkg and should not be depended on by external code, although I have no doubt that it is being used. There's no reason to create a new TOML package, just converge these two and then we can start using a snapshot of @wildart/TOML.jl from Pkg. |
OTOH https://github.com/wildart/TOML.jl says that
which was created, then deleted for reasons I that are not clear to me. This is somewhat confusing. |
@wildart, could you make me an owner of your TOML.jl repo so I can transfer it to an appropriate org and we can reinstate it as the official and maintained TOML package? |
@StefanKarpinski I added you as a collaborator. I tried to transfer ownership to you, but couldn't because you already have your own |
We could just push your repo to JuliaLang/TOML.jl. Edit: Unless we care about GitHub automatic redirects etc. |
@wildart, I think I need to be an admin on the repo in order to transfer it. |
You can't be an admin on a personal account, you are either the owner (wildart in this case) or a collaborator (https://help.github.com/en/github/setting-up-and-managing-your-github-user-account/permission-levels-for-a-user-account-repository). To make this transfer possible I believe wildart needs elevated permissions in the JuliaLang org. |
@wildart, you should already have permission to create repos on JuliaLang and therefore be able to transfer the repo. |
Done. It's JuliaLang/TOML.jl now. |
What do we need to do to replace the src and test folders with the version at Pkg/ext? This has bug fixes and improvements from mid-2019 contributed by me and Kristoffer?
|
* Use [`SafeTestsets.jl`](https://github.com/YingboMa/SafeTestsets.jl)to put all `@testset`s into a separate module, with a name generated by `gensym()`. Added as an `extra` dep, only downloaded when `test`ing * Added [`ArgParse.jl`](https://github.com/carlobaldassi/ArgParse.jl) and the [(currently internal)](JuliaLang/Pkg.jl#1011) [`TOML.jl`](https://github.com/JuliaLang/TOML.jl). Showcasing trivial functionality and project structure
Done. |
Does this include the fixes for values that are floating point and for generating TOML from a Julia dict using a symbol key?
The Pkg.TOML version has these.
|
I don't know which one that is.
Yes. |
The
Pkg.TOML
internal package (yes, it's inext
because it's an "external dependency") was originally based on @wildart's https://github.com/wildart/TOML.jl package. It was forked and vendored for a few of reasons: (1) @wildart got busy and wasn't merging pull requests for a while and (2) it wasn't feasible for the package manager to have an external package as a dependency and (3) I wasn't ready to deal with making it a stdlib package at the time.It's pretty stable at this point and since the registered TOML package is long abandoned (last commit three years ago), it seems like it would be a good time to make
Pkg.TOML
an official stdlib package. Here is a plan to get there:Pkg.TOML
's tests running (Test TOML #1012)Pkg.TOML
Pkg.TOML
's API and make sure it's what we want—does it match JSON, for example?stdlib/Pkg/ext/TOML
tostdlib/TOML
For deleting https://github.com/pygy/TOML.jl from the registry, we can just special case it to get dropped in the sync process. Since it doesn't support Julia ≥ 0.7 (or even 0.6) this shouldn't bother anyone. We should technically give this TOML a new UUID but I'm not sure it matters. The sync script may assume that it can compute stdlib UUIDs from their names somewhere, which would be broken by given the new
stdlib/TOML
a different UUID from the one that the old TOML already has.The text was updated successfully, but these errors were encountered: