-
Notifications
You must be signed in to change notification settings - Fork 0
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
Big Rewrite to simplify and rely less on julia internals #61
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Without the skiplines part for the moment
The one with skiplines are skipped for the moment as we are removing that
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #61 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 12 11 -1
Lines 841 653 -188
==========================================
- Hits 841 653 -188 ☔ View full report in Codecov by Sentry. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a complete rewrite of the internals of the package in an effort to make it easier to extend (e.g. add back support for the simple
@plutoinclude
and a future@fromenv
to allow importing directly from an environment.In this big rewrite, I am dropping the support for the
@skiplines
functionality which was cool but not really useful, and it would not really be compatible with the Revise integration that is planned next.The code went from directly parsing and executing all package code with custom eval calls, to use a combination of a
mapexpr
functions (similar to include) and cycling through parsed code withExprSplitter
from JuliaInterpreter.This already more similar to how Revise works and is used to get more accustomed to its internals.
A new type was also added to store all the relevant data for a given loaded package as opposed to a generic Dict that we used to have.
This new type is called
FromPackageController
.I dropped all dependencies from most of the Pkg internals (with EnvCache, Context, Project and Manifest) and now only directly add the target Project to the
LOAD_PATH
.I also load directly the relevant data from the Project and Manifest by parsing the toml file directly instead of relying on Pkg internals.
For the moment I also removed registering the package as root_module as this also heavily realies on some julia internals which are already changed in 1.11 or current master (1.12). Registering as a root module might still be useful for accessing package specific data like providing functionality via
Base.pkgdir
. I will re-add this as opt-in via a setting probably.For the moment I still depend on accessing
Base.loaded_modules
to extract loaded modules for loading packages from indirect dependencies.The tests have also been moved to use
TestItemRunner.jl
rather thanSafeTestsets.jl
for better integration in VSCodeStill todo items are:
import X as Y
statementsimport X: Y as Z
statements