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

[CLI] --help option prints out SDK errors #144

Open
Sahand-H opened this issue Jun 25, 2019 · 4 comments
Open

[CLI] --help option prints out SDK errors #144

Sahand-H opened this issue Jun 25, 2019 · 4 comments

Comments

@Sahand-H
Copy link
Member

Running blang --help leads to the following output (only grabbed a snippet of it) on macOS:

Compilation {
  Note: this may take more time the first time the command is called
    as some dependencies will be downloaded.
  Using blang SDK version 1.33.1
  Error {
    Compilation error report
 ...
    ERROR:The type BadNormal is already defined in BadNormal.java. (file:blang/validation/internals/fixtures/BadNormal.bl line : 5 column : 7)
    ERROR:no viable alternative at input 'index' (file:blang/validation/internals/fixtures/SpikeAndSlab.bl line : 21 column : 56)
    ERROR:no viable alternative at input '{' (file:blang/validation/internals/fixtures/SpikeAndSlab.bl line : 21 column : 64)
    ERROR:no viable alternative at input 'variable' (file:blang/validation/internals/fixtures/SpikeAndSlab.bl line : 22 column : 9)
    ERROR:no viable alternative at input 'isZero' (file:blang/validation/internals/fixtures/SpikeAndSlab.bl line : 22 column : 18)
    ERROR:no viable alternative at input 'isBool' (file:blang/validation/internals/fixtures/SpikeAndSlab.bl line : 22 column : 25)
    ERROR:missing EOF at 'generate' (file:blang/validation/internals/fixtures/SpikeAndSlab.bl line : 29 column : 3)
    ERROR:The method or field index is undefined (file:blang/validation/internals/fixtures/SpikeAndSlab.bl line : 24 column : 21)
    ERROR:The type SpikeAndSlab is already defined in SpikeAndSlab.java. (file:blang/validation/internals/fixtures/SpikeAndSlab.bl line : 4 column : 7)
    ERROR:The type DynamicNormalMixture is already defined in DynamicNormalMixture.java. (file:blang/validation/internals/fixtures/DynamicNormalMixture.bl line : 3 column : 7)
    ERROR:The type Operations is already defined in Operations.java. (file:blang/validation/internals/fixtures/Operations.bl line : 7 column : 7)
    ERROR:The type SimpleHierarchicalModel is already defined in SimpleHierarchicalModel.java. (file:blang/validation/internals/fixtures/SimpleHierarchicalModel.bl line : 3 column : 7)
    ERROR:The type Cyclic is already defined in Cyclic.java. (file:blang/validation/internals/fixtures/Cyclic.bl line : 5 column : 7)
    ERROR:The type MixtureModel is already defined in MixtureModel.java. (file:blang/validation/internals/fixtures/MixtureModel.bl line : 3 column : 7)
    ERROR:The type Simple is already defined in Simple.java. (file:blang/validation/internals/fixtures/Simple.bl line : 3 column : 7)
    ERROR:The type PCR is already defined in PCR.java. (file:blang/validation/internals/fixtures/PCR.bl line : 3 column : 7)
    ERROR:The type Coin is already defined in Coin.bl. (file:blang/SGBE/models/Coin.bl line : 2 column : 7)
    FAILURE: Build failed with an exception.
  } [ endingBlock=Error blockTime=27.66ms blockNErrors=2 ]
} [ endingBlock=Compilation blockTime=36.48s blockNErrors=4 ]
@alexandrebouchard
Copy link
Contributor

Is it possible that the command was ran in a directory within blang SDK?

@Sahand-H
Copy link
Member Author

This may have been a little premature. The errors were a result of running the command outside a contained directory (ran on desktop) and multiple SDK installs are the likely reason.

@alexandrebouchard
Copy link
Contributor

Still interested in figuring out how if we can at least improve the error message. Can you replicate and let me know what was in the directory that it was ran in? Thanks!

@kevinchern
Copy link
Collaborator

kevinchern commented Jun 25, 2019

Similar errors can be reproduced as follows (assuming CLI already set up)

mkdir test; cd test
git clone [email protected]:ubc-stat-ml/blangDemos.git
git clone [email protected]:ubc-stat-ml/blangExample.git
blang --help

I think a simple fix would be to recursively check for build.gradle in child directories.

(testing)

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

No branches or pull requests

3 participants