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

Fix syntax error problem for older versions of GHC #78

Merged

Conversation

anka-213
Copy link
Member

@anka-213 anka-213 commented Oct 8, 2020

This problem was introduced in #71

As reported by @inariksit:

Symptom 1: Command line parameters not recognised, e.g.

$ gf
> i -retain prelude/Prelude.gfo
> cc -all ss "hello"
syntax error

It should work like this:

> i -retain prelude/Prelude.gfo
> cc -all ss "hello"
hello

Symptom 2: error messages don't include line numbers. Example:

$ gf Foo.gf <some grammar with syntax errors>
- compiling Foo.gf... gf: syntax error

Expected:

$ gf Foo.gf <some grammar with syntax errors>
- compiling Foogf... 

Foo.gf:381:21:
   syntax error

Here is a script that I used for testing for symptom 1:

stackFile=stack.yaml

stack build --stack-yaml $stackFile  --ghc-options -j || exit 125

echo -e 'i -retain prelude/Prelude.gfo\ncc -all ss "hello"' |  GF_LIB_PATH=../gf-rgl/result/rgl/ stack --stack-yaml $stackFile $nixFlag run gf
echo -e 'i -retain prelude/Prelude.gfo\ncc -all ss "hello"' |  GF_LIB_PATH=../gf-rgl/result/rgl/ stack --stack-yaml $stackFile $nixFlag run gf | grep "hello" || exit 1

@anka-213
Copy link
Member Author

anka-213 commented Oct 8, 2020

The python build error is unrelated to this change. I've reported the problem upstream: pypa/cibuildwheel#446

@johnjcamilleri
Copy link
Member

Confirmed bug and fix, looks good to me!

@johnjcamilleri johnjcamilleri merged commit db5ee0b into GrammaticalFramework:master Oct 9, 2020
@anka-213 anka-213 deleted the solve-syntax-error-bug branch October 9, 2020 12:34
@anka-213
Copy link
Member Author

anka-213 commented Oct 9, 2020

Oh, the new version of cibuildwheel is released now, so we can replace the git reference with an
explicit version number now: https://github.com/joerick/cibuildwheel/releases/tag/v1.6.2

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 this pull request may close these issues.

2 participants