Code Monkey home page Code Monkey logo

Comments (18)

cpytel avatar cpytel commented on August 29, 2024

The last time I tried this finished just after I posted this and it was able to build the slug. I didn't do anything differently.

used has changed (was Cabal-1.18.1.2, now Cabal-1.18.1).
  Caching latest cabal sandbox
  Making GHC binaries available to Heroku command line
  Making cabal config available to Heroku command line
  Making cabal sandbox available to Heroku command line
Putting cache... done
Creating slug... done
Uploading slug... done
Success, slug is https://api.anvilworks.org/slugs/0bf0c872-118e-4f81-a89e-615fcb973348.tgz

However, releasing the slug isn't working now:

heroku release https://api.anvilworks.org/slugs/0bf0c872-118e-4f81-a89e-615fcb973348.tgz -a carnival-staging
Releasing to carnival-staging.heroku.com... ........................................................................................................................................failed
 !    An unknown error occurred. If the problem persists, please go to http://help.heroku.com and provide error id 6hp31be04

from carnival.

cpytel avatar cpytel commented on August 29, 2024

I've restarted the dyno and tried multiple times, I've created a heroku support ticket:
https://help.heroku.com/tickets/117648

from carnival.

pbrisbin avatar pbrisbin commented on August 29, 2024

I emailed Andy Macdonald last week at Dan's suggestion. He gave me a response today which wasn't extremely helpful but I'm going to follow up.

from carnival.

cpytel avatar cpytel commented on August 29, 2024

I got this response:

Hi Chad,

I just want to confirm. You already have a slug built and you're just trying to release it. Is that correct?

If so we have a new endpoint that should work better for you. You can read about it here:

https://blog.heroku.com/archives/2013/12/20/programmatically_release_code_to_heroku_using_the_platform_api

We're in a bit of a transition with this functionality. The Anvil route with the plugin you're using isn't a fully supported path, but there also isn't a nice neat plugin available for the new API.

We're looking at the error you experienced with the Anvil route and will get that working for you again, but in the meantime I wanted to point out that you do have another option.

Thanks,
John

from carnival.

cpytel avatar cpytel commented on August 29, 2024

I've got the multi-buildpack working on heroku (took some finagling) but that didn't fix the coffee script compilation problems

Loading package persistent-postgresql-1.3.1.1 ... linking ... done.
Loading package heroku-0.1 ... linking ... done.
Loading package gravatar-0.5.4 ... linking ... done.
[ 5 of 16] Compiling Settings.StaticFiles ( Settings/StaticFiles.hs, dist/build/Settings/StaticFiles.o )
[ 6 of 16] Compiling Foundation       ( Foundation.hs, dist/build/Foundation.o )

Foundation.hs:64:9: Warning: Defined but not used: ‘master’

Foundation.hs:65:9: Warning: Defined but not used: ‘mmsg’

Foundation.hs:114:5: Warning: Defined but not used: ‘master’

Foundation.hs:115:5: Warning: Defined but not used: ‘mmsg’
[ 7 of 16] Compiling Import           ( Import.hs, dist/build/Import.o )
[ 8 of 16] Compiling Handler.Session  ( Handler/Session.hs, dist/build/Handler/Session.o )

Handler/Session.hs:13:11:
    Exception when trying to run compile-time code:
      coffee: readProcessWithExitCode: runInteractiveProcess: exec: does not exist (No such file or directory)
    Code: widgetFile "session"
    In the splice: $(widgetFile "session")
[ 9 of 16] Compiling Helper.Auth      ( Helper/Auth.hs, dist/build/Helper/Auth.o )
[10 of 16] Compiling Helper.Request   ( Helper/Request.hs, dist/build/Helper/Request.o )
[11 of 16] Compiling Handler.Embed    ( Handler/Embed.hs, dist/build/Handler/Embed.o )

Handler/Embed.hs:11:20:
    Exception when trying to run compile-time code:
      coffee: readProcessWithExitCode: runInteractiveProcess: exec: does not exist (No such file or directory)
    Code: coffeeFile "embed/Article"
    In the splice: $(coffeeFile "embed/Article")
[12 of 16] Compiling Handler.User     ( Handler/User.hs, dist/build/Handler/User.o )
[13 of 16] Compiling Helper.Comment   ( Helper/Comment.hs, dist/build/Helper/Comment.o )
[14 of 16] Compiling Handler.Comments ( Handler/Comments.hs, dist/build/Handler/Comments.o )

Handler/Comments.hs:15:33: Warning:
    In the use of ‘parseJsonBody_’
    (imported from Import, but defined in Yesod.Core.Json):
    Deprecated: "Use requireJsonBody instead"
[15 of 16] Compiling Handler.Comment  ( Handler/Comment.hs, dist/build/Handler/Comment.o )

Handler/Comment.hs:15:56: Warning:
    In the use of ‘parseJsonBody_’
    (imported from Import, but defined in Yesod.Core.Json):
    Deprecated: "Use requireJsonBody instead"

 !     Push rejected, failed to compile Multipack app

from carnival.

croaky avatar croaky commented on August 29, 2024

Has it been considered to switch from CS to JS on this project?

from carnival.

cpytel avatar cpytel commented on August 29, 2024

We just discovered this problem with compiling coffeescript right at the
end of the day Friday.

But It is in our style guide to use coffeescript, and I think the code is
better for it.

We can reevaluate next week.

from carnival.

pbrisbin avatar pbrisbin commented on August 29, 2024

My guess would be that the coffeescript build-pack is putting the coffee binary in a location not in the $PATH while the haskell build-pack is running. This might require either or both of:

  • Export a new PATH with heroku config:set
  • Install that plugin that makes env vars available during compile

Just a guess though.

from carnival.

cpytel avatar cpytel commented on August 29, 2024

Yes, I think so too, I just had a few minutes yesterday and wanted to
update my progress and the current status.

from carnival.

cpytel avatar cpytel commented on August 29, 2024

I set a PATH heroku env variable to node_modules/coffee-script/bin. We already have the plugin installed and the ghc build pack exports env variables, but it explicitly ignores PATH. I checked the commit logs and its not clear why.

I'm hoping that its because heroku already uses it, and that would double up the path. I'm on a train with a sport connection now so I couldn't test a build to see.

from carnival.

pbrisbin avatar pbrisbin commented on August 29, 2024

Potential explanation: ddollar/heroku-buildpack-multi#5

from carnival.

pbrisbin avatar pbrisbin commented on August 29, 2024

Well, I thought I was being clever.

I copied Text.Coffee into a project-local Custom.Coffee override, and changed the settings from ReadProcess "coffee" to ReadProcess "./node_modules/coffee-script/bin/coffee".

That part worked, but unfortunately just gets us to this:

Handler/Embed.hs:11:20:
    Exception when trying to run compile-time code:
      exit code 127 from readProcess: ./node_modules/coffee-script/bin/coffee "-spb"

stderr:
/usr/bin/env: node: No such file or directory

So I guess we still somehow have to get an altered PATH into the build process...

By the way, as part of messing with all this, I unset that custom PATH that was in there. I'm not sure it was correct or even having any effect.

from carnival.

cpytel avatar cpytel commented on August 29, 2024

I got compilation to complete successfully by modifying the ghc build pack to allow us to add stuff to the path: thoughtbot/heroku-buildpack-ghc@0c87e14

The app is not starting successfully - according to the logs

2014-05-13T15:21:18.541781+00:00 heroku[web.1]: Starting process with command `./dist/build/carnival/carnival staging -p 27934`
2014-05-13T15:21:20.041289+00:00 app[web.1]: Error: No such file or directory

This is specified in the Procfile. And actually, I also don't have it locally.

from carnival.

pbrisbin avatar pbrisbin commented on August 29, 2024

I got compilation to complete successfully...

Awesome!

And actually, I also don't have it locally.

Different uses build different things. yesod devel and yesod test are probably all you've done and they don't produce or use that executable.

The buildpack should be doing

$ cabal clean && cabal configure && cabal build

Which you can try locally, to confirm that ./dist/build/carnival/carnival is built.

Also, the last lines of the build process should've been

In-place registering carnival-0.0.0...
Preprocessing executable 'carnival' for carnival-0.0.0...
[1 of 1] Compiling Main             ( app/main.hs, dist/build/carnival/carnival-tmp/Main.o )
Linking dist/build/carnival/carnival ...

Which would also confirm it's building that file.

The "No such file or directory" may be referring to something else?

from carnival.

pbrisbin avatar pbrisbin commented on August 29, 2024

Also interesting:

% heroku run bash
Running `bash` attached to terminal... up, run.8360
Error: No such file or directory

It appears the dyno can't run any processes.

from carnival.

pbrisbin avatar pbrisbin commented on August 29, 2024
PATH:                        vendor/node/bin:bin:node_modules/.bin

Was the problem.

I fixed it with

% heroku config:set PATH=vendor/node/bin:bin:node_modules/.bin:/usr/local/bin:/usr/bin:/bin

We appear to be live.

from carnival.

jferris avatar jferris commented on August 29, 2024

from carnival.

pbrisbin avatar pbrisbin commented on August 29, 2024

I'm going to close this since we are deployed, and comments are getting loaded from carnival-staging into robots-staging.

Unfortunately, I can't seem to post a comment. Logging in directly on carnival-staging is working, but when the login happens from robots-staging it just 401s on the follow up /user call (which is not handled gracefully either).

from carnival.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.