-
Notifications
You must be signed in to change notification settings - Fork 202
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
Redefine the semantics of clean without arguments #593
Comments
Yes, I've noticed this. This is a misbehavior caused by #590. This was working before, where We need to define what the best semantics are. I think it would make sense to remove the restriction on
I'd like to fix this whenever I also implement #575, that will allow us to compile and test several projects in one go. The benefit of this approach is that bloop would compile them in parallel compared to the sequential version |
bloop clean
without project doesn't give an error but does nothingbloop clean
without projects
bloop clean
without projects
Ping @dzamlo 😄 |
Sorry for the delayed response. All the scala project I work on are single projects.This means that sbt will creates two project (the normal project and the test project). Because the test project depends on the non-test one, I can already compile the two project by compiling the test one and there is a single to test anyway. All that to say that I'm not the more qualified to evaluate the usefulness of that. With all that said, I think that supporting multiple projects for the build and test command, especially in combination with the "-w" flag, makes a lot of sense. For the question fo what to do when no project is specified, my first thought was that this should be equivalent to specifying all the projects. Thinking a bit more about that, I'm not so sure anymore. It may be surprising for some users. Also, if one of your test as some side effect that you may not want, there is more risk that you accidentally run it. But, if this is clearly indicated in the documentation and when you run the command, this isn't an issue. So, I'm not really sure, but I thinks having the commands act like if all the project was specified when none are specified is a good idea. Anyways, I thinks that the clean, compile and test command should do the same thing regarding these questions. Otherwise It would be confusing. Another think to take into account. If you run As a side note, you could also get the parallelism by running the two command in at the same time, either with backgrounds jobs (with an |
I would love this. I've been thinking about this many times. Alternatively, we could add an optional key to project config files, e.g. Either way, I'd be happy to work on this one if there are no other volunteers. |
Even though I was in favor of this some months ago, now I fail to find any good evidence that merits breaking this behavior. 🤔 In which cases do you think the current semantics are problematic? (assuming we fix |
Well, typing two words instead of three (one argument less) for the most common task in Bloop (i.e. It's true I use Emacs most of the time, so I'm not typing these commands manually, but the thing I love about Bloop is that I can run it right in my shell without any overhead, so when I do that I forget about the project name quite often, being used to how If you're worried about confusing existing users, we could probably make it an option.
Regarding |
I'm a little bit confused. Isn't your last message endorsing the current behaviour? From your first message I got the idea you wanted to remove the parameter-less versions of the commands. |
OK, after a quick chat in Gitter we realized we're in the middle of a misunderstanding. So we agree that the resolution to this ticket is to make the Let's open another ticket to discuss how to allow users to modify the default project that is compiled, tested or cleaned when no parameters are passed. |
Isn't that the same thing that I suggested in #553 ? |
Sorry @dzamlo, I didn't see that ticket. Yes, it's quite similar, so I guess we can reuse that ticket - thanks 🙂 We discussed this in Gitter earlier today and came to a solution which should satisfy all needs, I think: |
If `bloop clean` is invoked without any projects specified, clean all projects (this is how it used to work). Also fix the command help and documentation. Closes scalacenter#593.
If `bloop clean` is invoked without any projects specified, clean all projects (this is how it used to work). Also fix the command help and documentation. Closes scalacenter#593.
If `bloop clean` is invoked without any projects specified, clean all projects (this is how it used to work). Also fix the command help and documentation. Closes scalacenter#593.
If you run
bloop clean
without specifying a project, nothing happen and it return a 0 (success) return code. I would expect that either:compile
ortest
sub command (that would beRequired project name not specified for 'clean'.
) and return the same return codeI think that 1 would the more consistent and less surprising.
Likely related to that issue, the help message for the
-p
argument ofbloop clean
is different that the one for thecompile
andtest
sub command (it doesn't specify that the remaining arguments are used). It's also not very clear from the help message that clean can work with multiple projects as arguments.The text was updated successfully, but these errors were encountered: