Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Don't require the build_lib flag #332

Closed
nrc opened this issue May 29, 2017 · 6 comments
Closed

Don't require the build_lib flag #332

nrc opened this issue May 29, 2017 · 6 comments

Comments

@nrc
Copy link
Member

nrc commented May 29, 2017

rls.toml was meant to be a temporary fix. However, it feels like for all but the simplest projects, some customistion using it is required. I would like more to work by default. I'm not sure how to accomplish this. Maybe we can make better guesses from the project directory structure or maybe we can query Cargo.

TODO step 1 - enumerate ways we need to improve, then think about how we can do that.

@luser
Copy link

luser commented Jul 6, 2017

This feels sort of related to the cargo build plan work, in that you want to know what cargo is going to build for the current crate.

@euclio
Copy link

euclio commented Jul 17, 2017

I guess one way to improve is removing the need for the build_lib flag. It seems like I have to add this one to every project.

@nrc
Copy link
Member Author

nrc commented Jul 17, 2017

Note: we now use client-side config, rather than rls.toml, but the point remains.

I guess one way to improve is removing the need for the build_lib flag. It seems like I have to add this one to every project.

This does seem to come up a lot. I wonder if we can change the default here. I don't know without checking what the effect of that might be. If we pass --lib to Cargo when it is not needed, does it break things? In particular, I'd be loathe to break 'hello world' out of the box.

@nrc
Copy link
Member Author

nrc commented Aug 6, 2017

So apparently passing --lib if there is only a bin (e.g., hello world) will break. We must be more clever than that, I guess. I'm not sure the best way to find out if there is a lib and a bin though. Maybe we can try, catch the error and try again without?

@euclio
Copy link

euclio commented Aug 6, 2017 via email

@nrc nrc changed the title Better out-of-the-box experience Don't require the build_lib flag Oct 30, 2017
@Xanewok
Copy link
Member

Xanewok commented Oct 30, 2017

It's been inferred for a while (#438).
@nrc does this solve this?

@nrc nrc closed this as completed Oct 30, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants