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

Yesod Quick Start #1359

Closed
Tshimanga opened this Issue Mar 14, 2017 · 6 comments

Comments

Projects
None yet
2 participants
@Tshimanga

Tshimanga commented Mar 14, 2017

Hmm, the Yesod Quick Start worked fine for me yesterday but today I keep getting the following error:

Trying again
Executable named nix-shell not found on path: ["/projects/20170314/blog/.stack-work/install/x86_64-linux/lts-8.5/8.0.2/bin","/home/bkt/.stack/snapshots/x86_64-linux/lts-8.5/8.0.2/bin","/home/bkt/.stack/programs/x86_64-linux/ghc-8.0.2/bin","/home/bkt/.cabal/bin","/opt/cabal/1.24/bin","/opt/ghc/8.0.2/bin","/home/bkt/anaconda3/bin","/home/bkt/bin","/home/bkt/.local/bin","/usr/local/sbin","/usr/local/bin","/usr/sbin","/usr/bin","/sbin","/bin","/usr/games","/usr/local/games","/snap/bin"]
Unexpected: child process exited with ExitFailure 1

I don't know what changed between going to bed last night and this morning, but I've tried starting over again with a clean box and the error persists. Any ideas?

@Tshimanga

This comment has been minimized.

Show comment
Hide comment
@Tshimanga

Tshimanga Mar 14, 2017

Perhaps worth adding that the error arises at the "stack exec -- yesod devel" step after compiling the modules and "Registering my-project-0.0.0..."

Tshimanga commented Mar 14, 2017

Perhaps worth adding that the error arises at the "stack exec -- yesod devel" step after compiling the modules and "Registering my-project-0.0.0..."

@snoyberg

This comment has been minimized.

Show comment
Hide comment
@snoyberg

snoyberg Mar 15, 2017

Member
Member

snoyberg commented Mar 15, 2017

@snoyberg snoyberg closed this in 039046e Mar 15, 2017

@snoyberg

This comment has been minimized.

Show comment
Hide comment
@snoyberg

snoyberg Mar 15, 2017

Member

Alternatively, you can try adding:

extra-deps:
- yesod-bin-1.5.2.2
Member

snoyberg commented Mar 15, 2017

Alternatively, you can try adding:

extra-deps:
- yesod-bin-1.5.2.2
@Tshimanga

This comment has been minimized.

Show comment
Hide comment
@Tshimanga

Tshimanga Mar 15, 2017

@snoyberg : hmm, changing to lts-8.4 no longer gives the nix error but the scaffolding site still fails with the following in the Terminal:

bk@bk:/projects/20170315/yesodd$ stack exec -- yesod devel
Yesod devel server. Enter 'quit' or hit Ctrl-C to quit.
Application can be accessed at:

http://localhost:3000
https://localhost:3443
If you wish to test https capabilities, you should set the following variable:
  export APPROOT=https://localhost:3443

yesodd-0.0.0: unregistering (flags changed from [] to ["-fdev","-flibrary-only"])
yesodd-0.0.0: configure (lib)
Configuring yesodd-0.0.0...
yesodd-0.0.0: build (lib)
Preprocessing library yesodd-0.0.0...
[ 1 of 11] Compiling Settings         ( Settings.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Settings.o )
[ 2 of 11] Compiling Settings.StaticFiles ( Settings/StaticFiles.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Settings/StaticFiles.o )
[ 3 of 11] Compiling Model            ( Model.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Model.o )
[ 4 of 11] Compiling Import.NoFoundation ( Import/NoFoundation.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Import/NoFoundation.o )
[ 5 of 11] Compiling Foundation       ( Foundation.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Foundation.o )
[ 6 of 11] Compiling Import           ( Import.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Import.o )
[ 7 of 11] Compiling Handler.Comment  ( Handler/Comment.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Handler/Comment.o )
[ 8 of 11] Compiling Handler.Common   ( Handler/Common.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Handler/Common.o )
[ 9 of 11] Compiling Handler.Home     ( Handler/Home.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Handler/Home.o )
[10 of 11] Compiling Handler.Profile  ( Handler/Profile.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Handler/Profile.o )
[11 of 11] Compiling Application      ( Application.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Application.o )
yesodd-0.0.0: copy/register
Installing library in
/projects/20170315/yesodd/.stack-work/install/x86_64-linux/lts-8.4/8.0.2/lib/x86_64-linux-ghc-8.0.2/yesodd-0.0.0-Kg6ANhDw7bs9pGxIzvXNCb
Registering yesodd-0.0.0...
ExitSuccess
Type help for available commands. Press enter to force a rebuild.
Starting devel application
Migrating: CREATE TABLE "user"("id" INTEGER PRIMARY KEY,"ident" VARCHAR NOT NULL,"password" VARCHAR NULL,CONSTRAINT "unique_user" UNIQUE ("ident"))
15/Mar/2017:01:35:48 -0700 [Debug#SQL] CREATE TABLE "user"("id" INTEGER PRIMARY KEY,"ident" VARCHAR NOT NULL,"password" VARCHAR NULL,CONSTRAINT "unique_user" UNIQUE ("ident")); []
Migrating: CREATE TABLE "email"("id" INTEGER PRIMARY KEY,"email" VARCHAR NOT NULL,"user_id" INTEGER NULL REFERENCES "user","verkey" VARCHAR NULL,CONSTRAINT "unique_email" UNIQUE ("email"))
Migrating: CREATE TABLE "comment"("id" INTEGER PRIMARY KEY,"message" VARCHAR NOT NULL,"user_id" INTEGER NULL REFERENCES "user")
Devel application launched: http://localhost:3000
15/Mar/2017:01:35:48 -0700 [Debug#SQL] CREATE TABLE "email"("id" INTEGER PRIMARY KEY,"email" VARCHAR NOT NULL,"user_id" INTEGER NULL REFERENCES "user","verkey" VARCHAR NULL,CONSTRAINT "unique_email" UNIQUE ("email")); []
15/Mar/2017:01:35:48 -0700 [Debug#SQL] CREATE TABLE "comment"("id" INTEGER PRIMARY KEY,"message" VARCHAR NOT NULL,"user_id" INTEGER NULL REFERENCES "user"); []

Meanwhile, adding "yesod-bin-1.5.2.2" to the xtra-deps in stack.yaml (without changing to lts-8.4) created the following error at the "stack build" step:

bk@bk:/projects/20170315/yesod$ stack build

Error: While constructing the build plan, the following exceptions were encountered:

Dependency cycle detected in packages:
    [yesod,classy-prelude-yesod,yesod]

Plan construction failed.

Tshimanga commented Mar 15, 2017

@snoyberg : hmm, changing to lts-8.4 no longer gives the nix error but the scaffolding site still fails with the following in the Terminal:

bk@bk:/projects/20170315/yesodd$ stack exec -- yesod devel
Yesod devel server. Enter 'quit' or hit Ctrl-C to quit.
Application can be accessed at:

http://localhost:3000
https://localhost:3443
If you wish to test https capabilities, you should set the following variable:
  export APPROOT=https://localhost:3443

yesodd-0.0.0: unregistering (flags changed from [] to ["-fdev","-flibrary-only"])
yesodd-0.0.0: configure (lib)
Configuring yesodd-0.0.0...
yesodd-0.0.0: build (lib)
Preprocessing library yesodd-0.0.0...
[ 1 of 11] Compiling Settings         ( Settings.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Settings.o )
[ 2 of 11] Compiling Settings.StaticFiles ( Settings/StaticFiles.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Settings/StaticFiles.o )
[ 3 of 11] Compiling Model            ( Model.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Model.o )
[ 4 of 11] Compiling Import.NoFoundation ( Import/NoFoundation.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Import/NoFoundation.o )
[ 5 of 11] Compiling Foundation       ( Foundation.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Foundation.o )
[ 6 of 11] Compiling Import           ( Import.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Import.o )
[ 7 of 11] Compiling Handler.Comment  ( Handler/Comment.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Handler/Comment.o )
[ 8 of 11] Compiling Handler.Common   ( Handler/Common.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Handler/Common.o )
[ 9 of 11] Compiling Handler.Home     ( Handler/Home.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Handler/Home.o )
[10 of 11] Compiling Handler.Profile  ( Handler/Profile.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Handler/Profile.o )
[11 of 11] Compiling Application      ( Application.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Application.o )
yesodd-0.0.0: copy/register
Installing library in
/projects/20170315/yesodd/.stack-work/install/x86_64-linux/lts-8.4/8.0.2/lib/x86_64-linux-ghc-8.0.2/yesodd-0.0.0-Kg6ANhDw7bs9pGxIzvXNCb
Registering yesodd-0.0.0...
ExitSuccess
Type help for available commands. Press enter to force a rebuild.
Starting devel application
Migrating: CREATE TABLE "user"("id" INTEGER PRIMARY KEY,"ident" VARCHAR NOT NULL,"password" VARCHAR NULL,CONSTRAINT "unique_user" UNIQUE ("ident"))
15/Mar/2017:01:35:48 -0700 [Debug#SQL] CREATE TABLE "user"("id" INTEGER PRIMARY KEY,"ident" VARCHAR NOT NULL,"password" VARCHAR NULL,CONSTRAINT "unique_user" UNIQUE ("ident")); []
Migrating: CREATE TABLE "email"("id" INTEGER PRIMARY KEY,"email" VARCHAR NOT NULL,"user_id" INTEGER NULL REFERENCES "user","verkey" VARCHAR NULL,CONSTRAINT "unique_email" UNIQUE ("email"))
Migrating: CREATE TABLE "comment"("id" INTEGER PRIMARY KEY,"message" VARCHAR NOT NULL,"user_id" INTEGER NULL REFERENCES "user")
Devel application launched: http://localhost:3000
15/Mar/2017:01:35:48 -0700 [Debug#SQL] CREATE TABLE "email"("id" INTEGER PRIMARY KEY,"email" VARCHAR NOT NULL,"user_id" INTEGER NULL REFERENCES "user","verkey" VARCHAR NULL,CONSTRAINT "unique_email" UNIQUE ("email")); []
15/Mar/2017:01:35:48 -0700 [Debug#SQL] CREATE TABLE "comment"("id" INTEGER PRIMARY KEY,"message" VARCHAR NOT NULL,"user_id" INTEGER NULL REFERENCES "user"); []

Meanwhile, adding "yesod-bin-1.5.2.2" to the xtra-deps in stack.yaml (without changing to lts-8.4) created the following error at the "stack build" step:

bk@bk:/projects/20170315/yesod$ stack build

Error: While constructing the build plan, the following exceptions were encountered:

Dependency cycle detected in packages:
    [yesod,classy-prelude-yesod,yesod]

Plan construction failed.
@snoyberg

This comment has been minimized.

Show comment
Hide comment
@snoyberg

snoyberg Mar 15, 2017

Member

I don't see an error message in the first output, everything looks correct. In the second case: can you paste your stack.yaml and .cabal files? Usually that error message means that you locally defined a package called yesod.

Member

snoyberg commented Mar 15, 2017

I don't see an error message in the first output, everything looks correct. In the second case: can you paste your stack.yaml and .cabal files? Usually that error message means that you locally defined a package called yesod.

@Tshimanga

This comment has been minimized.

Show comment
Hide comment
@Tshimanga

Tshimanga Mar 15, 2017

Ah, never mind. I was being a dumb dumb. Those two suggestions work just fine; though, this time during the build steps I got this warning for quite a few packages (just a heads up):

cabal-install-1.24.0.2: download
cabal-install-1.24.0.2: configure
Package cabal-install uses a custom Cabal build, but does not use a custom-setup stanza
Not using the explicit setup deps approach based on configuration
Strongly recommend fixing the package's cabal file
cabal-install-1.24.0.2: build
Package cabal-install uses a custom Cabal build, but does not use a custom-setup stanza
Not using the explicit setup deps approach based on configuration
Strongly recommend fixing the package's cabal file
cabal-install-1.24.0.2: copy/register
Package cabal-install uses a custom Cabal build, but does not use a custom-setup stanza
Not using the explicit setup deps approach based on configuration
Strongly recommend fixing the package's cabal file

That said, it all built and compiled just fine it seems.

On a side note, while these two workarounds do circumvent the issue, it is still there. Might I suggest keeping this issue open until the quick start steps work as written?

Regardless, thanks for your help Michael. Greatly appreciated!
Kerim

Tshimanga commented Mar 15, 2017

Ah, never mind. I was being a dumb dumb. Those two suggestions work just fine; though, this time during the build steps I got this warning for quite a few packages (just a heads up):

cabal-install-1.24.0.2: download
cabal-install-1.24.0.2: configure
Package cabal-install uses a custom Cabal build, but does not use a custom-setup stanza
Not using the explicit setup deps approach based on configuration
Strongly recommend fixing the package's cabal file
cabal-install-1.24.0.2: build
Package cabal-install uses a custom Cabal build, but does not use a custom-setup stanza
Not using the explicit setup deps approach based on configuration
Strongly recommend fixing the package's cabal file
cabal-install-1.24.0.2: copy/register
Package cabal-install uses a custom Cabal build, but does not use a custom-setup stanza
Not using the explicit setup deps approach based on configuration
Strongly recommend fixing the package's cabal file

That said, it all built and compiled just fine it seems.

On a side note, while these two workarounds do circumvent the issue, it is still there. Might I suggest keeping this issue open until the quick start steps work as written?

Regardless, thanks for your help Michael. Greatly appreciated!
Kerim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment