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

jshell Bach.java fails... #43

Closed
sormuras opened this issue Jan 31, 2019 · 2 comments
Closed

jshell Bach.java fails... #43

sormuras opened this issue Jan 31, 2019 · 2 comments
Assignees
Labels
3rd-party: jdk An issue (potentially) tracked via JBS

Comments

@sormuras
Copy link
Owner

sormuras commented Jan 31, 2019

Compilation chokes on current HEAD revision.

jshell https://raw.githubusercontent.com/sormuras/bach/master/src/bach/Bach.java

Error:
cannot find symbol
  symbol:   variable Property
    for (var property : Property.values()) {
                        ^------^
Error:
cannot find symbol
  symbol:   variable Action
      var action = Action.valueOf(Property.ACTION.get().toUpperCase());
                   ^----^
Error:
package Property does not exist
      var action = Action.valueOf(Property.ACTION.get().toUpperCase());
                                  ^-------------^
Error:
cannot find symbol
  symbol:   variable Action
        var action = Action.valueOf(argument.toUpperCase());
[...]
Error:
cannot find symbol
  symbol:   class Command
      var command = new Command(executable.toString()).addAll(arguments);
                        ^-----^
Error:
exception java.io.IOException is never thrown in body of corresponding try statement
      } catch (IOException e) {
        ^----------------------...
|  Welcome to JShell -- Version 11.0.2
|  For an introduction type: /help intro

This revision works!
jshell https://raw.githubusercontent.com/sormuras/bach/5e7165ef06c26423d8906038f2e061eb6cd8f374/src/bach/Bach.java

Here it stopped working...
jshell https://raw.githubusercontent.com/sormuras/bach/13cf5eb5a9045ac0158d6da585105d359591ba7f/src/bach/Bach.java

sormuras added a commit that referenced this issue Jan 31, 2019
@sormuras sormuras added the bug label Jan 31, 2019
@sormuras
Copy link
Owner Author

sormuras commented Feb 1, 2019

2 (or more) layers deep forward declaration is the underlying issue: https://bugs.openjdk.java.net/browse/JDK-8218179

@sormuras sormuras added 3rd-party: jdk An issue (potentially) tracked via JBS and removed bug labels Feb 1, 2019
sormuras added a commit that referenced this issue Feb 2, 2019
Simulating `jshell Make.java` that `/open Bach.java`...

Workaround for #43
@sormuras
Copy link
Owner Author

All types are declared within Bach.java again. This by-passes this issue.

@sormuras sormuras self-assigned this Jul 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3rd-party: jdk An issue (potentially) tracked via JBS
Projects
None yet
Development

No branches or pull requests

1 participant