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

Error while parsing $ - expected Object, but encountered Null #23

Closed
KBryan opened this issue Nov 9, 2020 · 5 comments
Closed

Error while parsing $ - expected Object, but encountered Null #23

KBryan opened this issue Nov 9, 2020 · 5 comments

Comments

@KBryan
Copy link
Contributor

KBryan commented Nov 9, 2020

Here is a dump from the error.
make build
docker build --build-arg REACHC_HASH="$(../scripts/git-hash.sh)" --tag="reachsh/reach":latest .
Sending build context to Docker daemon 1.041MB
Step 1/28 : FROM reachsh/haskell-builder:lts-16.12 as build
lts-16.12: Pulling from reachsh/haskell-builder
5d9821c94847: Already exists
a610eae58dfc: Already exists
a40e0eb9f140: Already exists
f5a1b3beb4d5: Pulling fs layer
00f60e56d58b: Pulling fs layer
7da1d9ee2c39: Pulling fs layer
bdcf8775a817: Pulling fs layer
02841cf00f57: Pulling fs layer
6d7b2c61f61a: Pull complete
76f8f84115ee: Pull complete
90a2e469cc7e: Pull complete
0531acd88941: Pull complete
4fd332f6d9c4: Pull complete
d515aee5fda5: Pull complete
Digest: sha256:8de67a4cd2f820b97cfa0b6b7bd18c11a694aaaeab49206387965351dfb57eb1
Status: Downloaded newer image for reachsh/haskell-builder:lts-16.12
---> 692b7e335c77
Step 2/28 : WORKDIR /build
---> Running in 01b510fb14e1
Removing intermediate container 01b510fb14e1
---> f460fba3481e
Step 3/28 : COPY stack.yaml package.yaml stack.yaml.lock ./
---> 4757f74e10af
Step 4/28 : RUN stack build --dependencies-only
---> Running in bdb9a29d3b80
/build/package.yaml: Error while parsing $ - expected Object, but encountered Null
The command '/bin/bash -o pipefail -c stack build --dependencies-only' returned a non-zero code: 1
make: *** [build] Error 1

@DanBurton
Copy link
Contributor

It seems that something is wrong with package.yaml. make build is supposed to generate a valid package.yaml file, but something seems to be wrong. Does a package.yaml file exist in your hs folder after running this command? And if so, can you paste it here?

@KBryan
Copy link
Contributor Author

KBryan commented Nov 9, 2020

It is just empty. Nothing to paste.

@DanBurton
Copy link
Contributor

Ah, ok. That explains it. Running make build should require that you have a command-line utility called mo installed. For some reason the command for generating package.yaml isn't failing (when I presume in this case it should fail?), but instead is just creating an empty file.

@jeapostrophe how do you think we should approach this issue?

@DanBurton
Copy link
Contributor

I've pushed a change to the makefiles.

44c6b43

It should now correctly fail if you don't have mo installed, and it will prompt you to run make install-mo which should install mo for you. (mo is a command line utility for filling in templates using environment variables.)

If you:

  • git pull
  • rm package.yaml
  • make build

It should tell you to run make install-mo. If you do that, then make-build again, it should build correctly.

Kindly let me know if this works for you or if there are further issues. Thanks!

@jeapostrophe
Copy link
Collaborator

@KBryan I believe that this issue is now settled, so I'm going to close the issue. If I'm in error, please correct me. :)

hamirmahal pushed a commit to hamirmahal/reach-lang that referenced this issue Oct 5, 2021
Utilize Reach's JSON Error Formatting
hamirmahal pushed a commit to hamirmahal/reach-lang that referenced this issue Oct 5, 2021
Utilize Reach's JSON Error Formatting
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