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

Failing to compile nativelib should stop everything #692

Closed
Duhemm opened this issue May 3, 2017 · 0 comments · Fixed by #714
Closed

Failing to compile nativelib should stop everything #692

Duhemm opened this issue May 3, 2017 · 0 comments · Fixed by #714
Milestone

Comments

@Duhemm
Copy link
Contributor

Duhemm commented May 3, 2017

Currently, failing the nativelib will just println an error message, but won't stop the whole process, which may still report success:

> tests/run
[info] Updating {file:/Users/martin/Documents/Projects.nosync/Duhemm/scala-native/}tests...
[info] Resolving jline#jline;2.14.3 ...
[info] Done updating.
[info] Compiling 5 Scala sources to /Users/martin/Documents/Projects.nosync/Duhemm/scala-native/unit-tests/target/scala-2.11/classes...
[warn] [0] /main/scala/scala/scalanative/IssuesSuite.scala:264: a pure expression does nothing in statement position; you may be omitting necessary parentheses
[warn] [1] /main/scala/scala/scalanative/IssuesSuite.scala:265: a pure expression does nothing in statement position; you may be omitting necessary parentheses
[warn] [2] unknown:0: there was one deprecation warning; re-run with -deprecation for details
[warn] /main/scala/scala/scalanative/IssuesSuite.scala: 264 [0], 265 [1]
[warn] unknown: 0 [2]
[error] /Users/martin/Documents/Projects.nosync/Duhemm/scala-native/unit-tests/target/scala-2.11/native/lib/statvfs.c:44:1: error: unknown type name 'foobar'
[error] foobar
[error] ^
[error] /Users/martin/Documents/Projects.nosync/Duhemm/scala-native/unit-tests/target/scala-2.11/native/lib/statvfs.c:46:1: error: expected identifier or '('
[error] int scalanative_fstatvfs(int fd, struct scalanative_statvfs *buf) {
[error] ^
[error] 2 errors generated.
Failed to compile native library runtime code.
[info] Linking (1635 ms)
[info] Discovered 2341 classes and 14739 methods
[info] Optimizing (8468 ms)
[info] Generating intermediate code (918 ms)
[info] Produced 53 files
[info] Compiling to native code (2914 ms)
[info] Linking native code (421 ms)
//
// Hundreds of lines
//
* tests.SuiteSuite$
  [ok] expects true
  [ok] does not expect false
  [ok] expects not false
  [ok] does not expect true
  [ok] expects A and throws A
  [ok] expects C and throws C with function
  [ok] expects A and throws B
  [ok] expects A and doesn't throw
[success] Total time: 17 s, completed May 3, 2017 9:51:53 AM

The error in nativeCompileLib is very unlikely to be noticed in this scenario.

Duhemm added a commit to Duhemm/scala-native that referenced this issue May 8, 2017
Duhemm added a commit to Duhemm/scala-native that referenced this issue May 8, 2017
Duhemm added a commit to Duhemm/scala-native that referenced this issue May 16, 2017
densh pushed a commit that referenced this issue May 16, 2017
* Scope Scala Native's tasks to `Compile` and `Test`

* Report native lib compilation failures

* Adapt scripted tests to scoping changes

* Remove unused imports

Fixes #692
muxanick pushed a commit to muxanick/scala-native that referenced this issue May 25, 2017
* Scope Scala Native's tasks to `Compile` and `Test`

* Report native lib compilation failures

* Adapt scripted tests to scoping changes

* Remove unused imports

Fixes scala-native#692
@densh densh added this to the Wontfix milestone Aug 28, 2018
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

Successfully merging a pull request may close this issue.

2 participants