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

Remove dependency on Pkg #20

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

asinghvi17
Copy link

@asinghvi17 asinghvi17 commented May 6, 2024

In Julia v1.11, Pkg is no longer part of the system image, and will introduce quite a bit of loading latency when the package is first loaded.

This PR removes the dependency on Pkg (it looks like only one Pkg function was used here).

@asinghvi17
Copy link
Author

There is one thing left to remove here, which is Pkg.Operations.read_project. This is actually a big one, but depends on the nature of how this package is used.

Does anyone get the compat, weakdeps, etc sections from the project using the package, or is the only user-facing API the macros (which are accessing top-level fields)? If the latter, then removing Pkg becomes trivial. If the former, then we have to think about the return type.

@KlausC
Copy link
Owner

KlausC commented May 7, 2024

@asinghvi17 thanks for the suggestion to remove dependency on Pkg.
You see, that your changes do not compile yet, but that should be repairable:
Hints:

  • Replace projectfile_path by Base.env_project_file (no need to copy from source from Pkg)
  • add dependency from TOML
  • replace 'Pkg....read_projectbyTOML.parsefile`
  • replace Pkg.Types.Project by the Dict returned from parsefile

@KlausC
Copy link
Owner

KlausC commented May 7, 2024

ps: please test locally before publishing you changes

@asinghvi17
Copy link
Author

That's why it's still a draft PR :D - I will probably update this with the rest of the fixes tomorrow.

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

Successfully merging this pull request may close these issues.

2 participants