-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
mechanism for default packages #18795
Comments
It seems clear to me that these packages should be as much like normal packages as possible. Here's a strawman proposal:
|
One of my biggest concerns with breaking up Base is testing and implementing changes to the Base language. Ideally, I would want:
The former seems straightforward, but the latter seems hard within the context of Github. Or am I missing some Github feature that would allow this? |
Arguably, anything that typically needs to be patched along with Julia doesn't benefit much from being a separate package, and its code could remain in this repo (maybe still moved to /stdlib though). |
It would be interesting to sort the files in I still think there should be a way to run CI on the default packages. Maybe optionally, e.g. via |
Idea: precompile |
Of course we can see if the normal package precompile mechanism is sufficient to get good startup time. We also might end up with starting the REPL being slower, but |
One option without needing to add too many new features to Pkg would be make |
I'm also not sure we really want these to be as much like normal packages as possible. It could be a good idea, but I'm not entirely convinced. As you ask, does it live in the same place? Should we do version resolution in the same way? This seems like a case where monolithic updating of all standard packages together seems like it may be preferable – otherwise you end up in a situation where each version of each standard package needs to work with not only a range of versions of Julia itself, but also with a range of versions of the other standard packages. |
To get this done asap it might be easiest/fastest to first split into separate packages logical files in base and to also leave them in base, i.e. |
Yes, I think that's a good idea, but we'd still need to decide how loading works, and how to install the stdlib, and whether the stdlib modules can be precompiled. If they aren't precompiled the delays could be quite frustrating. |
I think we pin the versions of packages that are included in the stdlib, and update the pinned versions frequently with a sufficient amount of testing. Same as any C dependency, we don't pull from master, and it's good to get as deterministic a build as possible so 0.6.0 built when it comes out behaves the same as 0.6.0 downloaded and built from source months later. If |
I feel there should not any difference between "pseudo" packages and "real" packages. For two reasons:
|
Ok, I'm convinced. These should be normal packages :) |
We do need to account for the possibility that the Julia distribution gets installed into a read-only location, in which case default packages wouldn't be updateable in-place. |
How about this: There is a user and a system package dir, where the former is searched first when a package is to be loaded. The packages included in the Julia distribution go into the system package dir (potentially read-only for the user), updates go into the user package dir (writable for the user). Options to the |
That already works with appropriate setting of LOAD_PATH, just anything outside of Pkg.dir doesn't currently participate in anything Pkg does. We don't want to require root to install a Julia-with-packages distribution, so I don't think system wide should be the default. Bundled packages should be specific to the Julia version they come bundled with, but with options to populate the user (or system wide if you have root) package directory from them. |
Sorry, with "system package dir" I didn't mean a necessarily system-wide installation location. For a per-user installation of Julia, that would just be somewhere in his Julia install path. Still, the benefit would be that a user could just delete his |
For 0.6 we should just install standard packages in the LOAD_PATH site directory, which we're currently not using but look in by default. The first step here is to move some of the ready-for-packaging modules in Base into the site directory. What's necessary for that and what modules? |
There are multiple pieces here - the build infrastructure for putting specific versions of packages in place, and the restructuring of a few modules. Restructuring modules is rearranging files and imports if they aren't a module yet, then filtering the git history and putting them into a separate package repo. Series of steps for any module to go through:
Most of the listed modules can go through any subset of these steps, and each one is (mostly) a prerequisite for the next. We don't have the mechanism for step 3 yet, but once it's there, 2->3 and 3->4 would individually be smaller steps than going straight from 2->4. |
A few observations:
|
#18928 reminds me that quadgk would be a good first case here - small, self-contained, no ccalls, not used by anything else in base. Step 1's already even done for it. |
Is this still slated for v0.6? Seemed like the push to finish it died down. |
I don't see how it can make it into 0.6, because we don't have step 3. |
If we move a lot of key numerical functionality out of Base without building additional infrastructure first, I'm concerned that it will have a serious impact on testing changes to the core language. It will be much harder to assess the impact on important packages, and much harder to detect performance regressions, if the numerical packages aren't updated in sync. e.g. a lot of the BaseBenchmarks functionality won't work if a PR breaks something like LinAlg and there is no way to update LinAlg in the same PR because it has been moved to a separate package. I agree with @amitmurthy that we also need to improve the infrastructure for building "batteries included" system images. |
What's wrong with the |
usrimg.jl is fine as far as it goes, but it requires too much user intervention. It needs to be coupled to our distribution mechanism so that julialang.org can post "batteries included" downloads. Moreover, there is the question of how updates are handled. |
Oh, that's fine; I thought there were concerns in the mechanics of how |
Is that more of a distribution issue then, an issue with sticking the right GUI on the install to make things easier, rather than requiring a new infrastructure? (Or a GUI for changing the system image?) This made me think of a proposal which I opened up here to make it easier. https://discourse.julialang.org/t/improved-installations-from-executables/1001/1 |
It is distribution (and Pkg/updating) infrastructure, but that's still new infrastructure. |
It appears to me that there are two separate issues here. The first one that is not contentious is that we need new infrastructure, which is already coming along with Pkg3/Bindeps2. The second issue is what the list of default packages should be, and should they continue to be in the julialang distribution, and if those packages are made available in the namespace by default. I don't think the second answer is easy for the 1.0 release schedule. The Pkg3 manifest file makes it easy to recreate a Julia environment in an easy way, and seems like an important part of the way forward. I am in favour of closing this issue in favour of existing Pkg3/Bindeps2 issues, which get addressed in 1.0, and the larger issue of a list of default packages be something we address after 1.0. |
@ViralBShah, there is also the issue of startup time if you want to load a bunch of external packages by default. Since that is a performance/packaging issue it doesn't need to be settled for 1.0, but it should be tracked somewhere. |
We need this one way or another, so whether we close this issue or not doesn't change the actual work that needs to be done. I have some thoughts on this which I can write up. |
Is this done now? What else is there to do? |
It's probably done. A remaining piece could be to clone certain packages during build, so that packages in external repos can also be in stdlib, but that can probably just be done case-by-case. |
Discussion related to #5155. There are a few steps needed to break up Base:
LOAD_PATH
.It is this last point, the pseudo-package mechanism, which, I suspect, blocks the whole process. Considerations:
The text was updated successfully, but these errors were encountered: