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

New version of Chapel cripples Chrest #8

Open
buddha314 opened this issue Mar 8, 2018 · 10 comments
Open

New version of Chapel cripples Chrest #8

buddha314 opened this issue Mar 8, 2018 · 10 comments

Comments

@buddha314
Copy link
Collaborator

@benharsh updated chapel to be much more strict in error checking. My experience has been that putting a try! in front gets past the error, but may not be the best solution.

Users/buddha/github/buddha314/chrest/src/ChrestRequestResponse.chpl:144: In function 'InputJson':
/Users/buddha/github/buddha314/chrest/src/ChrestRequestResponse.chpl:154: error: call to throwing function _cast without throws, try, or try! (relaxed mode)
$CHPL_HOME/modules/internal/StringCasts.chpl:86: note: throwing function _cast defined here
/Users/buddha/github/buddha314/chrest/src/ChrestRequestResponse.chpl:154: error: call to throwing function _cast without throws, try, or try! (relaxed mode)
$CHPL_HOME/modules/internal/StringCasts.chpl:86: note: throwing function _cast defined here
/Users/buddha/github/buddha314/chrest/src/ChrestRequestResponse.chpl:154: error: call to throwing function _cast without throws, try, or try! (relaxed mode)
$CHPL_HOME/modules/internal/StringCasts.chpl:172: note: throwing function _cast defined here
/Users/buddha/github/buddha314/chrest/src/ChrestRequestResponse.chpl:144: In function 'InputJson':
/Users/buddha/github/buddha314/chrest/src/ChrestRequestResponse.chpl:154: error: call to throwing function _cast without throws, try, or try! (relaxed mode)
$CHPL_HOME/modules/internal/StringCasts.chpl:46: note: throwing function _cast defined here
make: *** [default] Error 1
@buddha314
Copy link
Collaborator Author

Here is

chpl --version
chpl version 1.17.0 pre-release (6064fe8545)
Copyright (c) 2004-2018, Cray Inc.  (See LICENSE file for more details)

and

 printchplenv 
machine info: Darwin macbuddha.lan 16.7.0 Darwin Kernel Version 16.7.0: Mon Nov 13 21:56:25 PST 2017; root:xnu-3789.72.11~1/RELEASE_X86_64 x86_64
CHPL_HOME: /Users/buddha/github/chapel *
script location: /Users/buddha/github/chapel/util
CHPL_TARGET_PLATFORM: darwin
CHPL_TARGET_COMPILER: clang
CHPL_TARGET_ARCH: native
CHPL_LOCALE_MODEL: flat
CHPL_COMM: none
CHPL_TASKS: qthreads
CHPL_LAUNCHER: none
CHPL_TIMERS: generic
CHPL_UNWIND: none
CHPL_MEM: jemalloc
CHPL_ATOMICS: intrinsics
CHPL_GMP: gmp
CHPL_HWLOC: hwloc
CHPL_REGEXP: re2
CHPL_AUX_FILESYS: none

@marcoscleison
Copy link
Owner

I will try to reproduce the error.

@Tshimanga
Copy link

Tshimanga commented Mar 8, 2018

Reproduced on my machine

bk@bk:/projects/ayatollah$ chpl --version
chpl version 1.17.0 pre-release (aaa4f37)
Copyright (c) 2004-2018, Cray Inc.  (See LICENSE file for more details)


bk@bk:/projects/ayatollah$ printchplenv
machine info: Linux bk 4.13.0-32-generic #35~16.04.1-Ubuntu SMP Thu Jan 25 10:13:43 UTC 2018 x86_64
CHPL_HOME: /projects/chapel *
script location: /projects/chapel/util
CHPL_TARGET_PLATFORM: linux64
CHPL_TARGET_COMPILER: gnu
CHPL_TARGET_ARCH: native
CHPL_LOCALE_MODEL: flat
CHPL_COMM: none
CHPL_TASKS: qthreads
CHPL_LAUNCHER: none
CHPL_TIMERS: generic
CHPL_UNWIND: none
CHPL_MEM: jemalloc
CHPL_ATOMICS: intrinsics
CHPL_GMP: gmp
CHPL_HWLOC: hwloc
CHPL_REGEXP: re2
CHPL_AUX_FILESYS: none
bk@bk:/projects/ayatollah$ make
chpl -M/projects/chingon/src -M/projects/cdo/src -M/projects/numsuch/src -M/projects/chrest/src --fast --print-callstack-on-error --print-commands -I/usr/include -I/usr/local/Cellar/openblas/0.2.20/include -I/usr/include/postgresql -L/usr/local/Cellar/openblas/0.2.20/lib -lblas -o bin/ayatollah src/Ayatollah.chpl
/projects/chrest/src/ChrestRequestResponse.chpl:144: In function 'InputJson':
/projects/chrest/src/ChrestRequestResponse.chpl:154: error: call to throwing function _cast without throws, try, or try! (relaxed mode)
$CHPL_HOME/modules/internal/StringCasts.chpl:86: note: throwing function _cast defined here
/projects/chrest/src/ChrestRequestResponse.chpl:154: error: call to throwing function _cast without throws, try, or try! (relaxed mode)
$CHPL_HOME/modules/internal/StringCasts.chpl:86: note: throwing function _cast defined here
/projects/chrest/src/ChrestRequestResponse.chpl:154: error: call to throwing function _cast without throws, try, or try! (relaxed mode)
$CHPL_HOME/modules/internal/StringCasts.chpl:172: note: throwing function _cast defined here
/projects/chrest/src/ChrestRequestResponse.chpl:144: In function 'InputJson':
/projects/chrest/src/ChrestRequestResponse.chpl:154: error: call to throwing function _cast without throws, try, or try! (relaxed mode)
$CHPL_HOME/modules/internal/StringCasts.chpl:46: note: throwing function _cast defined here
Makefile:17: recipe for target 'default' failed
make: *** [default] Error 1

@buddha314
Copy link
Collaborator Author

Seems to be fixed, will have @Tshimanga confirm when he can.

@Tshimanga
Copy link

Yep, all clear! @buddha314 @marcoscleison

@ben-albrecht
Copy link

What was the fix?

@buddha314
Copy link
Collaborator Author

I'm not sure, but I think he had to add try / catch bounds. The new compiler is a cruel mistress.

@benharsh
Copy link

benharsh commented Mar 9, 2018

Just to clarify, I think these failures were a result of this PR that adds throwing errors to string casts:

chapel-lang/chapel#8547

When I mentioned "error checking" offline I meant semantic errors related to initializers like use-before-def errors with fields.

@marcoscleison
Copy link
Owner

Hi all,

I have some Reflexion module usage. Inside the reflection, I use type cast. the compiler was crying because the code block that uses type casts was not with try{}.

I added try{} and silenced the compiler for while.

@psahabu
Copy link

psahabu commented Mar 12, 2018

@marcoscleison et al: More information on error handling approaches can be found here, which should help you avoid fighting the compiler in the future.

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

6 participants