Skip to content
This repository has been archived by the owner on Feb 3, 2018. It is now read-only.

Make ProjectAnalyzer an argument to SourceManager.GetManifestAndLock() #195

Closed
sdboyer opened this issue Mar 20, 2017 · 0 comments · Fixed by #196
Closed

Make ProjectAnalyzer an argument to SourceManager.GetManifestAndLock() #195

sdboyer opened this issue Mar 20, 2017 · 0 comments · Fixed by #196
Assignees

Comments

@sdboyer
Copy link
Owner

sdboyer commented Mar 20, 2017

There's only one method for which the ProjectAnalyzer actually gets used - SourceManager.GetManifestAndLock(). There's really no reason that it has to be injected into the source manager as an argument to NewSourceManager(); it could just be passed as a parameter to that one method.

In addition to cleaning up some internal interfaces, the big advantage here is that a *sourceMgr instance is no longer bound to operate with a single ProjectAnalyzer. There's no current use case where this really matters right now, but this was a nasty coupling between solvers (whose correct operation is predicated on only ever having the one analyzer) and the source managers.

We can also eliminate SourceManager.AnalyzerInfo() as part of this.

@sdboyer sdboyer self-assigned this Mar 20, 2017
@sdboyer sdboyer mentioned this issue Mar 20, 2017
4 tasks
sdboyer added a commit that referenced this issue Apr 1, 2017
This was really always the intended model - there's no reason a
SourceManager needs to be permanently coupled with just one analyzer.
It's perfectly sufficient to provide one as an argument to the relevant
methods.

Fixes #195.
krisnova pushed a commit to krisnova/dep that referenced this issue Apr 21, 2017
This was really always the intended model - there's no reason a
SourceManager needs to be permanently coupled with just one analyzer.
It's perfectly sufficient to provide one as an argument to the relevant
methods.

Fixes sdboyer/gps#195.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant