Skip to content

Remove trait CtxMethods - work towards #11474 #11475

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

Closed
wants to merge 2 commits into from
Closed

Remove trait CtxMethods - work towards #11474 #11475

wants to merge 2 commits into from

Conversation

nielsle
Copy link
Contributor

@nielsle nielsle commented Jan 11, 2014

Remove the trait CtxMethods and convert all methods to functions. The diff is a little hard to read, but I tried to do very little apart from indenting and editing the lines containing "fn"

@alexcrichton
Copy link
Member

Why was this change done? This is backwards in terms of style with the rest of the compiler? Having a "context" with methods hung of it is incredibly frequent, why change them all to global functions?

@nielsle
Copy link
Contributor Author

nielsle commented Jan 11, 2014

The next step is to move all the functions to a separate crate name run_cmd and turn them in to private functions. That will make them encapsulated again. This will happen in next PR.

The overall goal is to remove the dependence on BuildContext. Therefore I wanted to start out removing the trait named CtxMethods that was implemented by BuildContext.

Subsequently I want to remove build_context as a parameter to some of the functions. So in the long run you will be able to run "ruspkg info" without creating a build_context with a work_cache.

EDIT: As I see it the build_context should not be created before rustpkg has decided that the user wants to build or install. This should happen after rustpkg has validated the command line. If you disagree with this, then my changes should probably be reverted.

@nielsle
Copy link
Contributor Author

nielsle commented Jan 11, 2014

After discussing on irc. I retract this PR.

@nielsle nielsle closed this Jan 11, 2014
@nielsle nielsle deleted the remove_ctxmethods branch January 11, 2014 21:54
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.

3 participants