Coder Social home page Coder Social logo

Comments (7)

snowleopard avatar snowleopard commented on May 16, 2024

I tried to reproduce this on my Windows machine but ghc-cabal hscolour libraries/ghc-prim dist-install was successful, as well as all other invocations of GhcCabalHsColour builder.

I've pushed a small related fix to deal with absolute paths on Windows: 30d3d63. Currently configure sets the following path in system.config: hscolour = /c/Users/[...] which I replaced with C:/Users/[...] to be able to run hscolour. Maybe there is a better way to deal with this.

from hadrian.

bgamari avatar bgamari commented on May 16, 2024

I can say that Prim.hs certainly does not exist where I would have expected it,

$ shake-build/build.sh
...
/--------
| Running GhcCabalHsColour with arguments:
|   hscolour
|   libraries/ghc-prim
|   dist-install
\--------
Running hscolour for ghc-prim-0.5.0.0...
Preprocessing library ghc-prim-0.5.0.0...
ghc-cabal: can't find source for GHC/Prim in ., dist-install/build/autogen
Error when running Shake build system:
* libraries/ghc-prim/dist-install/doc/html/ghc-prim/ghc-prim.haddock
user error (Development.Shake.cmd, system command failed
Command: /opt/exp/ghc/ghc/inplace/bin/ghc-cabal hscolour libraries/ghc-prim dist-install
Exit code: 1
Stderr:
ghc-cabal: can't find source for GHC/Prim in ., dist-install/build/autogen
)

$ ls libraries/ghc-prim/dist-install/build/autogen/
cabal_macros.h  Paths_ghc_prim.hs

from hadrian.

snowleopard avatar snowleopard commented on May 16, 2024

Ah, that's true. I can now reproduce this. We need to add a dependency on autogen/GHC/Prim.hs (this file is generated by a rule in Rules/Generate.hs).

If you amend you pull request #8 I'll fix this using your partial solution (otherwise we'll have merge conflicts).

from hadrian.

snowleopard avatar snowleopard commented on May 16, 2024

Not sure why this got closed automatically when merging #8...

from hadrian.

bgamari avatar bgamari commented on May 16, 2024

What is the status of this?

My impression was that 8e8cc53 is the correct solution here. HsColour depends upon the source. Settings.getPackagesSources should already handle the addition of autogen/GHC/Prim.hs.

from hadrian.

snowleopard avatar snowleopard commented on May 16, 2024

Sorry, full rebuild takes a huge time on my machine (I need to find out why).

I think you are right and 8e8cc53 should be enough but I'd like to double check before closing this.

from hadrian.

snowleopard avatar snowleopard commented on May 16, 2024

OK, I've tested this and I think we can close this now.

A minor relevant fix: 0c9d7d8.

from hadrian.

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.