Skip to content
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

Allow to run externally-defined main classes #717

Merged
merged 1 commit into from
Nov 14, 2018

Conversation

tindzk
Copy link
Contributor

@tindzk tindzk commented Nov 14, 2018

Currently, the following error is triggered when specifying a valid
class that is not defined in the project:

$ bloop run root -m play.core.server.ProdServerStart
[E] Missing main class  in project 'root'

Simplify the logic of findMainClasses(). The validation logic is
redundant since specifying an invalid main class will be caught at a
later point:

 $ bloop run root -m test
[E] Error: Could not find or load main class test

Currently, the following error is triggered when specifying a valid
class that is not defined in the project:

```shell
$ bloop run root -m play.core.server.ProdServerStart
[E] Missing main class  in project 'root'
```

Simplify the logic of `findMainClasses()`. The validation logic is
redundant since specifying an invalid main class will be caught at a
later point:

```shell
 $ bloop run root -m test
[E] Error: Could not find or load main class test
```
@tindzk tindzk force-pushed the issue/716-external-main-classes branch from 6f5e937 to 9b1579c Compare November 14, 2018 20:01
Copy link
Contributor

@jvican jvican left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wonderful! Thank you 👍

@jvican jvican added bug A defect or misbehaviour. task / run labels Nov 14, 2018
@jvican jvican merged commit f36ae3d into scalacenter:master Nov 14, 2018
@jvican
Copy link
Contributor

jvican commented Nov 14, 2018

I merged this too quick, @tindzk would you mind following up this bug fix with a test? The logic is straightforward but every bug fix should have a test to ensure that we don't regress.

@jvican jvican added the community Any change or proposal that is contributed by the Open Source Community. label Nov 15, 2018
@jvican jvican changed the title Interpreter: Allow to run externally-defined main classes Allow to run externally-defined main classes Nov 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A defect or misbehaviour. community Any change or proposal that is contributed by the Open Source Community. task / run
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants