This repository has been archived by the owner on Feb 3, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
Introduce source
concept within SourceManager
#83
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
I pulled this out a while back, but going back to it's been a long time coming. Not all the SourceManager methods strictly need the information in a ProjectIdentifier, but it's much easier to be consistent and just always require it. This does not actually convert function/method bodies - just signatures. In no way does this come even close to compiling.
This strategy isn't perfect, but there's more refactoring needed for this segment to really make it sane.
Yeah, we're just gonna have to go whole hog on this. The system's too borky and complected as-is to sanely do a minor refactor.
This reverts commit 7c516b8.
There needs to be a mutex *somewhere* around these maps. These are there as a warning reminder that something needs to be done, even though a per-map mutex system seems very unlikely to have sufficient performance benefit to offset the complexity cost (and concomitant deadlock risk).
This makes actually collecting the result slice more straightforward later.
Also unexport its fields. We can revisit this later when we're actually ready to start dealing with persisting the caches to disk.
This will hold the pathDeducers, to be used by the SourceManager when performing path deduction.
An issue exists that I'm going to punt to a followup: for import paths where deduction results in fundamentally altering the base URL (so, all vanity imports), if underlying URL is ever explicitly referenced in a different import path, then two instances of the I'm leaving it in because:
|
This adds one additional field, a flag indicating whether the root future is *actually* async (there's currently only one case in deduction where it actually does require network activity). This allows the main handling process to be a little smarter about how it stores the information.
This helps resolve a problem that will probably only exist for vcs-type sources, where there could be a difference between the input ident (e.g., a plain import path) and the actual on-disk ident of the resulting source (e.g., a full URL). The manager needs to know which unique string ident is in use, because that will become an access path for lookups (in addition to the input path).
Forgot to include this on the earlier commit that privileged hg over git.
This is a major milestone. The old way of handling source information, the projectManager, is totally gone, replaced by the new source-based system. There's still work to be done there, but with tests passing, we're more or less at parity with what we had before.
haha, just kidding - i actually fixed that issue with the underlying URLs. it still does need a test, though. |
uuuuuugh NuGet |
sdboyer
force-pushed
the
url-separation
branch
from
August 15, 2016 14:03
627aec0
to
fb58f5b
Compare
This entails updating the bridge, which entails updating the solver. It also entails updating the testing depspec source manager. All are in alignment now, and tests are passing, so we're fully converted to the new source-based system for gathering information (woohoo!).
sdboyer
force-pushed
the
url-separation
branch
from
August 15, 2016 15:03
2a3573b
to
185880b
Compare
I totally misread the docs, interpreting the "pkg" as a literal for the shortened form. Not so, not so at all.
Hopefully this ends up being a temporary measure, but in the meantime...
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 introduces a
source
concept (perhaps will be exported eventually), around which theSourceMgr
operates. It replaces the oldprojectManager
concept.This carries with it a ton of changes with respect to deduction around import paths, repo storage, isolation of different upstream URLs (per #27), and how we deal with import paths/repos/sources/names in general (#10). The visible difference is mostly that we change
SourceManager
to take aProjectIdentifier
basically everywhere that it used to take aProjectRoot
.This list of TODOs is sloppy, as a lot of discovery caused this issue to morph a few times while I was working on it. I'm trying to keep it at least semi-sane.
Source
, which is the unit that theSourceMgr
actually works withSourceManager
itselfSourceMgr
internals to totally not care about anything likeGOPATH
at all anymorebaseVCSSource
as embeddable helper for allvcsSource
sprojectManager
, replacing with thesource
systemsource
creation