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

stack yesod devel doesn't actually refresh recompiled application #1057

Closed
NCrashed opened this Issue Aug 17, 2015 · 15 comments

Comments

Projects
None yet
3 participants
@NCrashed

NCrashed commented Aug 17, 2015

Platform: Fedora 21 x86_64
stack: 0.1.3.1
lts: 3.1

How to reproduce

  1. stack install yesod-bin cabal-install --install-ghc
  2. mkdir yesod-devel-test && cd yesod-devel-test
  3. stack exec -- yesod init --bare && stack initInput: yesod-devel-test, simple
  4. stack build
  5. stack exec yesod devel - check http://127.0.0.1:3000
  6. Change home route in config/routes (change from / to /home) without stopping yesod devel. It detects the change, recompiles, but doesn't deploy modified version. http://127.0.0.1:3000/home returns 404, and http://127.0.0.1:3000 returns 200 (should be swapped).

@NCrashed NCrashed changed the title from stack yesod devel doesn't actually refreshing recompiled application to stack yesod devel doesn't actually refresh recompiled application Aug 17, 2015

@snoyberg

This comment has been minimized.

Show comment
Hide comment
@snoyberg

snoyberg Aug 18, 2015

Member

Can you try making a different change, such as modifying a .hamlet file or changing something in a .hs file? There's been a bug multiple times in the past where GHC did not recompile correctly for config/routes changes.

Member

snoyberg commented Aug 18, 2015

Can you try making a different change, such as modifying a .hamlet file or changing something in a .hs file? There's been a bug multiple times in the past where GHC did not recompile correctly for config/routes changes.

@NCrashed

This comment has been minimized.

Show comment
Hide comment
@NCrashed

NCrashed Aug 18, 2015

Either .hamlet, .hs, .julius and .hs change doesn't reflect in an application instance. Seems that yesod devel uses only prebuilt version with direct call to stack build.

NCrashed commented Aug 18, 2015

Either .hamlet, .hs, .julius and .hs change doesn't reflect in an application instance. Seems that yesod devel uses only prebuilt version with direct call to stack build.

@snoyberg

This comment has been minimized.

Show comment
Hide comment
@snoyberg

snoyberg Aug 18, 2015

Member

I just checked with latest stack and yesod-bin, and changes made to a .hamlet file did display. Can you test this on a fresh scaffolded application, and describe exactly what changes you made? Also, what's the output of yesod version and stack --version (yes, I see 0.1.3.1 above, but just want to make sure we're looking at the same Git hash).

Member

snoyberg commented Aug 18, 2015

I just checked with latest stack and yesod-bin, and changes made to a .hamlet file did display. Can you test this on a fresh scaffolded application, and describe exactly what changes you made? Also, what's the output of yesod version and stack --version (yes, I see 0.1.3.1 above, but just want to make sure we're looking at the same Git hash).

@NCrashed

This comment has been minimized.

Show comment
Hide comment
@NCrashed

NCrashed Aug 18, 2015

Full log of actions:

[ncrashed@MAIN haskell]$ yesod version
yesod-bin version: 1.4.13.3
[ncrashed@MAIN haskell]$ stack --version
Version 0.1.3.1
[ncrashed@MAIN haskell]$ mkdir yesod-devel-test2 && cd yesod-devel-test2
[ncrashed@MAIN yesod-devel-test2]$ stack exec -- yesod init --bare && stack init
Run from outside a project, using implicit global config
Using resolver: lts-3.1 from global config file: /home/ncrashed/.stack/global/stack.yaml
Welcome to the Yesod scaffolder.
I'm going to be creating a skeleton Yesod project for you.

What do you want to call your project? We'll use this for the cabal name.

Project name: yesod-devel-test2
Yesod uses Persistent for its (you guessed it) persistence layer.
This tool will build in either SQLite or PostgreSQL or MongoDB support for you.
We recommend starting with SQLite: it has no dependencies.

    s      = sqlite
    p      = postgresql
    pf     = postgresql + Fay (experimental)
    mongo  = mongodb
    mysql  = MySQL
    simple = no database, no auth
    mini   = bare bones, the "Hello World" of multi-file Yesod apps
             (Note: not configured to work with yesod devel)
    url    = Let me specify URL containing a site (advanced)

So, what'll it be? simple
That's it! I'm creating your files now...

---------------------------------------

                     ___
                            {-)   |\
                       [m,].-"-.   /
      [][__][__]         \(/\__/\)/
      [__][__][__][__]~~~~  |  |
      [][__][__][__][__][] /   |
      [__][__][__][__][__]| /| |
      [][__][__][__][__][]| || |  ~~~~
  ejm [__][__][__][__][__]__,__,  \__/


---------------------------------------

The foundation for your web application has been built.


There are a lot of resources to help you use Yesod.
Start with the book: http://www.yesodweb.com/book
Take part in the community: http://yesodweb.com/page/community


It's highly recommended to follow the quick start guide for
installing Yesod: http://www.yesodweb.com/page/quickstart

If your system is already configured correctly, please run:

    stack build && stack exec -- yesod devel
Writing default config file to: /home/ncrashed/dev/haskell/yesod-devel-test2/stack.yaml
Basing on cabal files:
- /home/ncrashed/dev/haskell/yesod-devel-test2/yesod-devel-test2.cabal

Checking against build plan lts-3.1
Selected resolver: lts-3.1
Wrote project config to: /home/ncrashed/dev/haskell/yesod-devel-test2/stack.yaml
[ncrashed@MAIN yesod-devel-test2]$ stack build
yesod-devel-test2-0.0.0: configure
Configuring yesod-devel-test2-0.0.0...
yesod-devel-test2-0.0.0: build
Preprocessing library yesod-devel-test2-0.0.0...
[1 of 8] Compiling Settings         ( Settings.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Settings.o )
[2 of 8] Compiling Settings.StaticFiles ( Settings/StaticFiles.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Settings/StaticFiles.o )
[3 of 8] Compiling Import.NoFoundation ( Import/NoFoundation.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Import/NoFoundation.o )
[4 of 8] Compiling Foundation       ( Foundation.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Foundation.o )
[5 of 8] Compiling Import           ( Import.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Import.o )
[6 of 8] Compiling Handler.Common   ( Handler/Common.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Handler/Common.o )
[7 of 8] Compiling Handler.Home     ( Handler/Home.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Handler/Home.o )
[8 of 8] Compiling Application      ( Application.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Application.o )
In-place registering yesod-devel-test2-0.0.0...
Preprocessing executable 'yesod-devel-test2' for yesod-devel-test2-0.0.0...
[1 of 1] Compiling Main             ( app/main.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/yesod-devel-test2/yesod-devel-test2-tmp/Main.o )
Linking .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/yesod-devel-test2/yesod-devel-test2 ...
yesod-devel-test2-0.0.0: install
Installing library in
/home/ncrashed/dev/haskell/yesod-devel-test2/.stack-work/install/x86_64-linux/lts-3.1/7.10.2/lib/x86_64-linux-ghc-7.10.2/yesod-devel-test2-0.0.0-LkVNn2LeEwcLGVU3n5gfEX
Installing executable(s) in
/home/ncrashed/dev/haskell/yesod-devel-test2/.stack-work/install/x86_64-linux/lts-3.1/7.10.2/bin
Registering yesod-devel-test2-0.0.0...
[ncrashed@MAIN yesod-devel-test2]$ stack exec yesod devel
Yesod devel server. Type 'quit' to quit
Application can be accessed at:

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

Resolving dependencies...
Configuring yesod-devel-test2-0.0.0...
Forcing recompile for ./Foundation.hs because of config/routes
Forcing recompile for ./Foundation.hs because of templates/default-layout-wrapper.hamlet
Forcing recompile for ./Foundation.hs because of templates/default-layout.hamlet
Forcing recompile for ./Handler/Home.hs because of templates/homepage.hamlet
Forcing recompile for ./Handler/Home.hs because of templates/homepage.julius
Forcing recompile for ./Handler/Home.hs because of templates/homepage.lucius
Rebuilding application... (using cabal)
Starting development server...
Starting devel application
Devel application launched: http://localhost:3000

Now changing templates/homepage.hamlet first line from:

<h1>Welcome to Yesod!

To:

<h1>Welcome to Yesod! Test!

Reaction of yesod devel:

Forcing recompile for ./Handler/Home.hs because of templates/homepage.hamlet
Stopping development server...
Exit code: ExitSuccess
Forcing recompile for ./Handler/Home.hs because of templates/homepage.hamlet
Forcing recompile for ./Handler/Home.hs because of templates/homepage.hamlet
Rebuilding application... (using cabal)
Starting development server...
Starting devel application
Devel application launched: http://localhost:3000

Now look at http://127.0.0.1:3000 and there is no Test! in the title. Log of yesod devel while requesting the page:

127.0.0.1 - - [18/Aug/2015:15:32:00 +0300] "GET / HTTP/1.1" 200 - "" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0"
127.0.0.1 - - [18/Aug/2015:15:32:00 +0300] "GET /static/fonts/glyphicons-halflings-regular.woff HTTP/1.1" 200 - "http://localhost:3000/static/css/bootstrap.css?etag=QRP3qj9r" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0"
127.0.0.1 - - [18/Aug/2015:15:32:00 +0300] "GET /static/fonts/glyphicons-halflings-regular.ttf HTTP/1.1" 200 - "http://localhost:3000/static/css/bootstrap.css?etag=QRP3qj9r" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0"
127.0.0.1 - - [18/Aug/2015:15:32:00 +0300] "GET /favicon.ico HTTP/1.1" 200 1342 "" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0"

If I quit the yesod devel and rebuild with stack, changes are shown:

[ncrashed@MAIN yesod-devel-test2]$ stack build
stack build
yesod-devel-test2-0.0.0-e3727ba1b79606b17648f7f09d70e00b: unregistering (local file changes)
yesod-devel-test2-0.0.0: build
Preprocessing library yesod-devel-test2-0.0.0...
[7 of 8] Compiling Handler.Home     ( Handler/Home.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Handler/Home.o ) [templates/homepage.hamlet changed]
[8 of 8] Compiling Application      ( Application.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Application.o ) [Handler.Home changed]
In-place registering yesod-devel-test2-0.0.0...
Preprocessing executable 'yesod-devel-test2' for yesod-devel-test2-0.0.0...
Linking .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/yesod-devel-test2/yesod-devel-test2 ...
yesod-devel-test2-0.0.0: install
Installing library in
/home/ncrashed/dev/haskell/yesod-devel-test2/.stack-work/install/x86_64-linux/lts-3.1/7.10.2/lib/x86_64-linux-ghc-7.10.2/yesod-devel-test2-0.0.0-LkVNn2LeEwcLGVU3n5gfEX
Installing executable(s) in
/home/ncrashed/dev/haskell/yesod-devel-test2/.stack-work/install/x86_64-linux/lts-3.1/7.10.2/bin
Registering yesod-devel-test2-0.0.0...

[ncrashed@MAIN yesod-devel-test2]$ stack exec yesod devel
Yesod devel server. Type 'quit' to quit
Application can be accessed at:

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

Resolving dependencies...
Configuring yesod-devel-test2-0.0.0...
Rebuilding application... (using cabal)
Starting development server...
Starting devel application
Devel application launched: http://localhost:3000
127.0.0.1 - - [18/Aug/2015:15:38:08 +0300] "GET / HTTP/1.1" 200 - "" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0"
127.0.0.1 - - [18/Aug/2015:15:38:08 +0300] "GET /static/css/bootstrap.css HTTP/1.1" 304 - "http://127.0.0.1:3000/" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0"
127.0.0.1 - - [18/Aug/2015:15:38:08 +0300] "GET /static/tmp/autogen-pGIQ-osA.css HTTP/1.1" 200 - "http://127.0.0.1:3000/" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0"
127.0.0.1 - - [18/Aug/2015:15:38:08 +0300] "GET /static/tmp/autogen-SWBGXCgb.js HTTP/1.1" 200 - "http://127.0.0.1:3000/" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0"
127.0.0.1 - - [18/Aug/2015:15:38:08 +0300] "GET /static/fonts/glyphicons-halflings-regular.woff HTTP/1.1" 200 - "http://localhost:3000/static/css/bootstrap.css?etag=QRP3qj9r" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0"
127.0.0.1 - - [18/Aug/2015:15:38:08 +0300] "GET /static/fonts/glyphicons-halflings-regular.ttf HTTP/1.1" 200 - "http://localhost:3000/static/css/bootstrap.css?etag=QRP3qj9r" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0"
127.0.0.1 - - [18/Aug/2015:15:38:08 +0300] "GET /favicon.ico HTTP/1.1" 200 1342 "" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0"

NCrashed commented Aug 18, 2015

Full log of actions:

[ncrashed@MAIN haskell]$ yesod version
yesod-bin version: 1.4.13.3
[ncrashed@MAIN haskell]$ stack --version
Version 0.1.3.1
[ncrashed@MAIN haskell]$ mkdir yesod-devel-test2 && cd yesod-devel-test2
[ncrashed@MAIN yesod-devel-test2]$ stack exec -- yesod init --bare && stack init
Run from outside a project, using implicit global config
Using resolver: lts-3.1 from global config file: /home/ncrashed/.stack/global/stack.yaml
Welcome to the Yesod scaffolder.
I'm going to be creating a skeleton Yesod project for you.

What do you want to call your project? We'll use this for the cabal name.

Project name: yesod-devel-test2
Yesod uses Persistent for its (you guessed it) persistence layer.
This tool will build in either SQLite or PostgreSQL or MongoDB support for you.
We recommend starting with SQLite: it has no dependencies.

    s      = sqlite
    p      = postgresql
    pf     = postgresql + Fay (experimental)
    mongo  = mongodb
    mysql  = MySQL
    simple = no database, no auth
    mini   = bare bones, the "Hello World" of multi-file Yesod apps
             (Note: not configured to work with yesod devel)
    url    = Let me specify URL containing a site (advanced)

So, what'll it be? simple
That's it! I'm creating your files now...

---------------------------------------

                     ___
                            {-)   |\
                       [m,].-"-.   /
      [][__][__]         \(/\__/\)/
      [__][__][__][__]~~~~  |  |
      [][__][__][__][__][] /   |
      [__][__][__][__][__]| /| |
      [][__][__][__][__][]| || |  ~~~~
  ejm [__][__][__][__][__]__,__,  \__/


---------------------------------------

The foundation for your web application has been built.


There are a lot of resources to help you use Yesod.
Start with the book: http://www.yesodweb.com/book
Take part in the community: http://yesodweb.com/page/community


It's highly recommended to follow the quick start guide for
installing Yesod: http://www.yesodweb.com/page/quickstart

If your system is already configured correctly, please run:

    stack build && stack exec -- yesod devel
Writing default config file to: /home/ncrashed/dev/haskell/yesod-devel-test2/stack.yaml
Basing on cabal files:
- /home/ncrashed/dev/haskell/yesod-devel-test2/yesod-devel-test2.cabal

Checking against build plan lts-3.1
Selected resolver: lts-3.1
Wrote project config to: /home/ncrashed/dev/haskell/yesod-devel-test2/stack.yaml
[ncrashed@MAIN yesod-devel-test2]$ stack build
yesod-devel-test2-0.0.0: configure
Configuring yesod-devel-test2-0.0.0...
yesod-devel-test2-0.0.0: build
Preprocessing library yesod-devel-test2-0.0.0...
[1 of 8] Compiling Settings         ( Settings.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Settings.o )
[2 of 8] Compiling Settings.StaticFiles ( Settings/StaticFiles.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Settings/StaticFiles.o )
[3 of 8] Compiling Import.NoFoundation ( Import/NoFoundation.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Import/NoFoundation.o )
[4 of 8] Compiling Foundation       ( Foundation.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Foundation.o )
[5 of 8] Compiling Import           ( Import.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Import.o )
[6 of 8] Compiling Handler.Common   ( Handler/Common.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Handler/Common.o )
[7 of 8] Compiling Handler.Home     ( Handler/Home.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Handler/Home.o )
[8 of 8] Compiling Application      ( Application.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Application.o )
In-place registering yesod-devel-test2-0.0.0...
Preprocessing executable 'yesod-devel-test2' for yesod-devel-test2-0.0.0...
[1 of 1] Compiling Main             ( app/main.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/yesod-devel-test2/yesod-devel-test2-tmp/Main.o )
Linking .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/yesod-devel-test2/yesod-devel-test2 ...
yesod-devel-test2-0.0.0: install
Installing library in
/home/ncrashed/dev/haskell/yesod-devel-test2/.stack-work/install/x86_64-linux/lts-3.1/7.10.2/lib/x86_64-linux-ghc-7.10.2/yesod-devel-test2-0.0.0-LkVNn2LeEwcLGVU3n5gfEX
Installing executable(s) in
/home/ncrashed/dev/haskell/yesod-devel-test2/.stack-work/install/x86_64-linux/lts-3.1/7.10.2/bin
Registering yesod-devel-test2-0.0.0...
[ncrashed@MAIN yesod-devel-test2]$ stack exec yesod devel
Yesod devel server. Type 'quit' to quit
Application can be accessed at:

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

Resolving dependencies...
Configuring yesod-devel-test2-0.0.0...
Forcing recompile for ./Foundation.hs because of config/routes
Forcing recompile for ./Foundation.hs because of templates/default-layout-wrapper.hamlet
Forcing recompile for ./Foundation.hs because of templates/default-layout.hamlet
Forcing recompile for ./Handler/Home.hs because of templates/homepage.hamlet
Forcing recompile for ./Handler/Home.hs because of templates/homepage.julius
Forcing recompile for ./Handler/Home.hs because of templates/homepage.lucius
Rebuilding application... (using cabal)
Starting development server...
Starting devel application
Devel application launched: http://localhost:3000

Now changing templates/homepage.hamlet first line from:

<h1>Welcome to Yesod!

To:

<h1>Welcome to Yesod! Test!

Reaction of yesod devel:

Forcing recompile for ./Handler/Home.hs because of templates/homepage.hamlet
Stopping development server...
Exit code: ExitSuccess
Forcing recompile for ./Handler/Home.hs because of templates/homepage.hamlet
Forcing recompile for ./Handler/Home.hs because of templates/homepage.hamlet
Rebuilding application... (using cabal)
Starting development server...
Starting devel application
Devel application launched: http://localhost:3000

Now look at http://127.0.0.1:3000 and there is no Test! in the title. Log of yesod devel while requesting the page:

127.0.0.1 - - [18/Aug/2015:15:32:00 +0300] "GET / HTTP/1.1" 200 - "" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0"
127.0.0.1 - - [18/Aug/2015:15:32:00 +0300] "GET /static/fonts/glyphicons-halflings-regular.woff HTTP/1.1" 200 - "http://localhost:3000/static/css/bootstrap.css?etag=QRP3qj9r" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0"
127.0.0.1 - - [18/Aug/2015:15:32:00 +0300] "GET /static/fonts/glyphicons-halflings-regular.ttf HTTP/1.1" 200 - "http://localhost:3000/static/css/bootstrap.css?etag=QRP3qj9r" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0"
127.0.0.1 - - [18/Aug/2015:15:32:00 +0300] "GET /favicon.ico HTTP/1.1" 200 1342 "" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0"

If I quit the yesod devel and rebuild with stack, changes are shown:

[ncrashed@MAIN yesod-devel-test2]$ stack build
stack build
yesod-devel-test2-0.0.0-e3727ba1b79606b17648f7f09d70e00b: unregistering (local file changes)
yesod-devel-test2-0.0.0: build
Preprocessing library yesod-devel-test2-0.0.0...
[7 of 8] Compiling Handler.Home     ( Handler/Home.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Handler/Home.o ) [templates/homepage.hamlet changed]
[8 of 8] Compiling Application      ( Application.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Application.o ) [Handler.Home changed]
In-place registering yesod-devel-test2-0.0.0...
Preprocessing executable 'yesod-devel-test2' for yesod-devel-test2-0.0.0...
Linking .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/yesod-devel-test2/yesod-devel-test2 ...
yesod-devel-test2-0.0.0: install
Installing library in
/home/ncrashed/dev/haskell/yesod-devel-test2/.stack-work/install/x86_64-linux/lts-3.1/7.10.2/lib/x86_64-linux-ghc-7.10.2/yesod-devel-test2-0.0.0-LkVNn2LeEwcLGVU3n5gfEX
Installing executable(s) in
/home/ncrashed/dev/haskell/yesod-devel-test2/.stack-work/install/x86_64-linux/lts-3.1/7.10.2/bin
Registering yesod-devel-test2-0.0.0...

[ncrashed@MAIN yesod-devel-test2]$ stack exec yesod devel
Yesod devel server. Type 'quit' to quit
Application can be accessed at:

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

Resolving dependencies...
Configuring yesod-devel-test2-0.0.0...
Rebuilding application... (using cabal)
Starting development server...
Starting devel application
Devel application launched: http://localhost:3000
127.0.0.1 - - [18/Aug/2015:15:38:08 +0300] "GET / HTTP/1.1" 200 - "" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0"
127.0.0.1 - - [18/Aug/2015:15:38:08 +0300] "GET /static/css/bootstrap.css HTTP/1.1" 304 - "http://127.0.0.1:3000/" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0"
127.0.0.1 - - [18/Aug/2015:15:38:08 +0300] "GET /static/tmp/autogen-pGIQ-osA.css HTTP/1.1" 200 - "http://127.0.0.1:3000/" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0"
127.0.0.1 - - [18/Aug/2015:15:38:08 +0300] "GET /static/tmp/autogen-SWBGXCgb.js HTTP/1.1" 200 - "http://127.0.0.1:3000/" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0"
127.0.0.1 - - [18/Aug/2015:15:38:08 +0300] "GET /static/fonts/glyphicons-halflings-regular.woff HTTP/1.1" 200 - "http://localhost:3000/static/css/bootstrap.css?etag=QRP3qj9r" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0"
127.0.0.1 - - [18/Aug/2015:15:38:08 +0300] "GET /static/fonts/glyphicons-halflings-regular.ttf HTTP/1.1" 200 - "http://localhost:3000/static/css/bootstrap.css?etag=QRP3qj9r" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0"
127.0.0.1 - - [18/Aug/2015:15:38:08 +0300] "GET /favicon.ico HTTP/1.1" 200 1342 "" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0"
@snoyberg

This comment has been minimized.

Show comment
Hide comment
@snoyberg

snoyberg Aug 18, 2015

Member

Instead of rebuilding with stack in between changes, what happens if you just exit yesod devel and rerun it? Do the changes display then?

Member

snoyberg commented Aug 18, 2015

Instead of rebuilding with stack in between changes, what happens if you just exit yesod devel and rerun it? Do the changes display then?

@NCrashed

This comment has been minimized.

Show comment
Hide comment
@NCrashed

NCrashed Aug 18, 2015

Just checked two cases:

  • yesod devel is up => change is made => yesod devel is restarted
  • yesod devel is up => yesod devel stopped => change is made => yesod devel started

Both cases don't display a change to hamlet file.

NCrashed commented Aug 18, 2015

Just checked two cases:

  • yesod devel is up => change is made => yesod devel is restarted
  • yesod devel is up => yesod devel stopped => change is made => yesod devel started

Both cases don't display a change to hamlet file.

@snoyberg

This comment has been minimized.

Show comment
Hide comment
@snoyberg

snoyberg Aug 18, 2015

Member

I can't reproduce this behavior. Perhaps you can ask on the mailing list if others are experiencing something like this?

Member

snoyberg commented Aug 18, 2015

I can't reproduce this behavior. Perhaps you can ask on the mailing list if others are experiencing something like this?

@BlakeRain

This comment has been minimized.

Show comment
Hide comment
@BlakeRain

BlakeRain Aug 19, 2015

I've been switching some of our projects over to stack and have just encountered this issue with yesod devel. Following the steps above does indeed trigger a recompile as shown, yet the changes are not reflected until a recompilation is done by stack.

It seems that yesod-bin with devel is using cabal to rebuild rather than stack. Is that expected?

BlakeRain commented Aug 19, 2015

I've been switching some of our projects over to stack and have just encountered this issue with yesod devel. Following the steps above does indeed trigger a recompile as shown, yet the changes are not reflected until a recompilation is done by stack.

It seems that yesod-bin with devel is using cabal to rebuild rather than stack. Is that expected?

@snoyberg

This comment has been minimized.

Show comment
Hide comment
@snoyberg

snoyberg Aug 19, 2015

Member

It is expected to be compiling with the cabal executable for now. It's a short-term hack until wai-devel comes out the door, hopefully in the next month or two.

I'm still not able to reproduce the bug. Can you try the following in your project directory:

stack clean
cabal clean
stack build yesod-bin
stack exec yesod devel

and tell me what behavior you see initially and when changing templates?

Member

snoyberg commented Aug 19, 2015

It is expected to be compiling with the cabal executable for now. It's a short-term hack until wai-devel comes out the door, hopefully in the next month or two.

I'm still not able to reproduce the bug. Can you try the following in your project directory:

stack clean
cabal clean
stack build yesod-bin
stack exec yesod devel

and tell me what behavior you see initially and when changing templates?

@BlakeRain

This comment has been minimized.

Show comment
Hide comment
@BlakeRain

BlakeRain Aug 19, 2015

First of all, I couldn't run:

cabal clean

I had to run:

stack exec cabal clean

The stack build yesod-bin command output nothing.

Afterwards, the changes to the project were still not reflected and a subsequent change is still causing a rebuild but nothing being displayed.

If we're still using runghc against devel.hs is this perhaps linking against the wrong package (the stack built package rather than the cabal built one)?

BlakeRain commented Aug 19, 2015

First of all, I couldn't run:

cabal clean

I had to run:

stack exec cabal clean

The stack build yesod-bin command output nothing.

Afterwards, the changes to the project were still not reflected and a subsequent change is still causing a rebuild but nothing being displayed.

If we're still using runghc against devel.hs is this perhaps linking against the wrong package (the stack built package rather than the cabal built one)?

@snoyberg

This comment has been minimized.

Show comment
Hide comment
@snoyberg

snoyberg Aug 19, 2015

Member

That's possible. Can you try stack exec ghc-pkg unregister yourpackagename?
This is starting to sound like something I may know how to fix ;)

On Wed, Aug 19, 2015, 7:48 PM Blake Rain notifications@github.com wrote:

First of all, I couldn't run:

cabal clean

I had to run:

stack exec cabal clean

The stack build yesod-bin command output nothing.

Afterwards, the changes to the project were still not reflected and a
subsequent change is still causing a rebuild but nothing being displayed.

If we're still using runghc against devel.hs is this perhaps linking
against the wrong package (the stack built package rather than the cabal
built one)?


Reply to this email directly or view it on GitHub
#1057 (comment).

Member

snoyberg commented Aug 19, 2015

That's possible. Can you try stack exec ghc-pkg unregister yourpackagename?
This is starting to sound like something I may know how to fix ;)

On Wed, Aug 19, 2015, 7:48 PM Blake Rain notifications@github.com wrote:

First of all, I couldn't run:

cabal clean

I had to run:

stack exec cabal clean

The stack build yesod-bin command output nothing.

Afterwards, the changes to the project were still not reflected and a
subsequent change is still causing a rebuild but nothing being displayed.

If we're still using runghc against devel.hs is this perhaps linking
against the wrong package (the stack built package rather than the cabal
built one)?


Reply to this email directly or view it on GitHub
#1057 (comment).

@BlakeRain

This comment has been minimized.

Show comment
Hide comment
@BlakeRain

BlakeRain Aug 19, 2015

Aha!

Yes, that does indeed cause changes to be reflected again.

BlakeRain commented Aug 19, 2015

Aha!

Yes, that does indeed cause changes to be reflected again.

@NCrashed

This comment has been minimized.

Show comment
Hide comment
@NCrashed

NCrashed Aug 19, 2015

Yep, It works. Thank you!

NCrashed commented Aug 19, 2015

Yep, It works. Thank you!

@snoyberg

This comment has been minimized.

Show comment
Hide comment
@snoyberg

snoyberg Aug 19, 2015

Member

Awesome debugging @BlakeRain :) Glad we have a short term solution. I'll patch up yesod-bin, it should hopefully be trivial.

Member

snoyberg commented Aug 19, 2015

Awesome debugging @BlakeRain :) Glad we have a short term solution. I'll patch up yesod-bin, it should hopefully be trivial.

@snoyberg snoyberg closed this in ce456d4 Aug 20, 2015

@snoyberg

This comment has been minimized.

Show comment
Hide comment
@snoyberg

snoyberg Aug 20, 2015

Member

Bug fix released, with an announcement to the Yesod mailing list to explain.

Member

snoyberg commented Aug 20, 2015

Bug fix released, with an announcement to the Yesod mailing list to explain.

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