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

]dev AnyStdlib fails #51374

Open
LilithHafner opened this issue Sep 18, 2023 · 7 comments
Open

]dev AnyStdlib fails #51374

LilithHafner opened this issue Sep 18, 2023 · 7 comments
Labels
packages Package management and loading stdlib Julia's standard library

Comments

@LilithHafner
Copy link
Member

(@v1.11) pkg> dev Dates
    Updating registry at `~/.julia/registries/General.toml`
ERROR: The following package names could not be resolved:
 * Dates (ade2ca70-3891-5945-98fb-dc099432e06a in manifest but not in project)

(@v1.11) pkg> dev Unicode
ERROR: The following package names could not be resolved:
 * Unicode (4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5 in manifest but not in project)

(@v1.11) pkg> dev SortingAlgorithms
   Resolving package versions...
    Updating `~/.julia/environments/v1.11/Project.toml`
  [a2af1166] + SortingAlgorithms v1.1.1 `~/.julia/dev/SortingAlgorithms`
    Updating `~/.julia/environments/v1.11/Manifest.toml`
  [34da2185] + Compat v4.9.0
  [864edb3b] + DataStructures v0.18.15
  [a2af1166] + SortingAlgorithms v1.1.1 `~/.julia/dev/SortingAlgorithms`

This is a self contained, actionable, subset of #35991. Getting ]free to work would be another bonus.

@LilithHafner LilithHafner added packages Package management and loading stdlib Julia's standard library labels Sep 18, 2023
@KristofferC
Copy link
Member

What should dev Unicode do exactly?

@LilithHafner
Copy link
Member Author

Just like ]dev SortingAlgorithms, it should

  1. make the latest source code of the Unicode package available in the folder joinpath(Pkg.devdir(), "Unicode")
  2. make it so that loading Unicode (e.g. using Unicode) loads the code in that folder
    2.5) If Revise is loaded prior to the new instance of Unicode, make sure that changes made to the source code in joinpath(Pkg.devdir(), "Unicode") are tracked by revise
  3. make it so that I can run git checkout -b my-new-branch/git commit -a -m "my changes"/gh pr create and contribute my changes upstream.
    3.5) Make it possible to ]dev Unicode and ]dev Dates without having git combine the changes to the two codebases (just like how ]dev SortingAlgorithms and ]dev Plots don't get combined)

To support steps 3 and 3.5 for Unicode (which does not have its own Repo) we can clone julia into joinpath(Pkg.devdir(), ".Unicode") and create the symlink symlink(joinpath(Pkg.devdir(), ".Unicode", "stdlibs", "Unicode"), joinpath(Pkg.devdir(), "Unicode")).

@LilithHafner
Copy link
Member Author

"Sparse checkout" may help make this look more pretty, but I don't think it will actually save bandwidth or disk space.

@KristofferC
Copy link
Member

KristofferC commented Sep 19, 2023

make it so that loading Unicode (e.g. using Unicode) loads the code in that folder

Cannot really happen since Unicode is in the sysimage and you can only load one instance of a package.

@LilithHafner
Copy link
Member Author

We could automate the UUID changing process described here to trick ourselves into loading a new version of the stlib for direct use, but without displacing the existing version that other packages depend on.

@KristofferC
Copy link
Member

That sounds very weird then that your dependencies do not load the package that you devved (which is unlike the case for any other normal package).

@LilithHafner
Copy link
Member Author

That's true :/. Do you have any ideas for how we could support developing standard libraries which remain in the sysimg?

Setting the Revise tracking target to a new codebase seems inadequate because we can't redefine types that way.

Perhaps it is possible to reload packages in the sysimg the same way it is possible to reload packages defined in Main?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages Package management and loading stdlib Julia's standard library
Projects
None yet
Development

No branches or pull requests

2 participants