Giter Site home page Giter Site logo

pier's People

Contributors

brendanhay avatar cmk avatar judah avatar philderbeast avatar thoradam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pier's Issues

Consider "override" mechanism for Stackage packages

Some packages are set up with strange edge cases; for example, hslua doesn't list the include file lua.h in the includes clause, only in the extra-src-files. Rather than implementing special cases for each one, consider hard-coding a list of packages with explicit overrides.

User documentation

Add documentation of how to invoke stake, what the commands do (e.g. clean vs clean-all), and where output files are located.

Preprocess use stake-built executables

Use stake-created executables for happy, alex, hsc2hs, etc.

hsc2hs should be provided by the GHC install. alex/happy can be built as separate packages.

Allow lower-cased `main-is`

If an executable has a lower-cased main-is, stake will output an error:

Error when running Shake build system:
* Top-level action/want
ModuleName.fromString: invalid module name "main"
CallStack (from HasCallStack):
  error, called at libraries/Cabal/Cabal/Distribution/ModuleName.hs:81:44 in Cabal-1.24.2.0:Distribution.ModuleName

Example package: yaml

Support c2hs as a preprocessor

Add c2hs to the list of supported preprocessors.

Find a package using it, and confirm that it builds after this change.

Option for linking executables statically

It will make rebuilds take up significantly less space, and possibly take less time too. (We might be able to avoid the "dynamic-too" and "ar" invocations if we're only building shared libraries with "-shared".)

We'll want to add a linkArtifact analogue of copyArtifact, and link all dylibs in one location (similar to the workaround that Cabal/Nix/etc use for macOS Sierra).

  • Make dynamic linking the default
  • Allow static linking as another option
  • Work around the macOS Sierra linking issue

`cryptonite` with `lts-9.10` doesn't build

I can successfully run:
stack --resolver lts-9.10 install cryptonite

Also, this succeeds:

*Development.Stake> :main build -p lts-9.6 cryptonite
Downloading plan...
Downloading cryptonite-0.23
Downloading memory-0.14.8
Downloading foundation-0.0.15
Downloading basement-0.0.2
Building basement-0.0.2
Building foundation-0.0.15
Building memory-0.14.8
Building cryptonite-0.23
Build completed in 1:09m

However, this then failed:

*Development.Stake> :main build -p lts-9.10 cryptonite
Downloading plan...
Downloading foundation-0.0.16
Downloading basement-0.0.3
Building basement-0.0.3
Building foundation-0.0.16
Building memory-0.14.8
Building cryptonite-0.23

.stake/downloads/hackage/cryptonite-0.23/Crypto/Hash/Types.hs:56:22: error:
    • No instance for (ByteArrayAccess (F.UArray Word8))
        arising from the 'deriving' clause of a data type declaration
      Possible fix:
        use a standalone 'deriving instance' declaration,
          so you can specify the instance context yourself
      There are instances for similar types:
        instance basement-0.0.2:Basement.PrimType.PrimType ty =>
                 ByteArrayAccess (basement-0.0.2:Basement.UArray.Base.UArray ty)
          -- Defined in ‘[email protected]:Data.ByteArray.Types’
    • When deriving the instance for (ByteArrayAccess (Digest a))

Reorganize modules

reorganize and consolidate the individual modules. There's some overlap in their functionality.

Make local "frozen" version of stackage/hackage

Enable working with a local version of a subset of hackage/stackage:

  • specific LTSes
  • specific packages
  • Possibly: GHC version (see #8)

Enable generating such a set from the closure of a small set of packages (e.g., what's tested in CI).

Useful for developing on airplanes, saving bandwidth costs, etc.

Support Alex

Support alex as a preprocessor.

Find a package that requires this, and confirm it builds after this change.

Link warning when building aeson

Building aeson-1.1.2.0
unused rules: 3
Warning: ignoring unrecognised input `.stake/build/lts-9.6/packages/aeson-1.1.2.0/o/.stake/downloads/hackage/aeson-1.1.2.0/cbits/unescape_string.dyn_o'

Use a `pier.yaml` file

Use its own file rather than stack.yaml, since they're going to diverge in which fields they support.

More robust sandboxing

Either use a "true" sandbox (potentially hard), or just figure out how to do lndir more quickly (for example by caching the set of deps under a directory).

Implement `pier repl`

The command pier ghci ("repl"?) should build all dependencies of the given target(s) and then load the source files into ghci.

Don't use uuidgen

Don't require the separate program uuidgen. Either use an in-process implementation, or just generate a random number, or do something simpler.

Better unit testing

Add explicit unit tests, instead of (or in addition to) the mass-package-compile that's currently in the CircleCI scripts.

Ideally this would let us decrease the time for CircleCI to run significantly, for example by avoiding large packages like haskell-src-exts and language-c.

Support `hpack` for local packages

Support using hpack to build local packages.

Generate the .cabal file in a separate Artifact, to avoid polluting the output directory.

Restrict which binaries the rules can call

shake will pull binaries from the current $PATH, which is more lenient than we might like.

One option is to wrap calls to Distribution.Shake.command in setEnv, but that seems a little heavy-weight (and possibly not thread-safe). Another option is to wrap the whole program in it.

Integrate with Nix

Consider a feature similar to stack --nix which uses Nix for external dependencies.

This appears to be necessary for running pier on NixOS.

Haddock support

Allow stake to generate haddocks for a given set of libraries.

Maybe also just a "shallow" version that doesn't generate it for dependencies.

False-positive "Building {pkg}" notifications

After a make clean, stake outputs "Building {pkg}" even when it's not going to re-run any of the Commands.

On the one hand, this is useful for debugging. On the other, it's probably more helpful to report only when we're actually re-running GHC et al. (Similar to bazel's per-action progress message.)

Support Cabal-2

Currently we build against Cabal-1.24.0.2, since that's what's in lts-9.*. We should support newer Cabal (2.*.*.*) at some point.

Re-implement with Command

Also figure out a good hermetic story for rebuilds of GHC packages that don't recompile unnecessarily...

Silence GHC install

Hide stderr output from the GHC install, unless something fails.

Look for a way to do this more generically (without losing the ability to see ghc warnings)

Parse `ShakeOptions`

Parse options from the command-line (add optparse-applicative for it).

  • Any shake option (via something like --shake-arg=)
  • some specific ones like verbosity and num. threads

Implement `pier test`

Implement a pier test command that builds and runs individual tests.

Also add an option to build but not run them; maybe do that by default.

Decide whether the actual runs should be cached or not (or if that should be another option).

Build local packages

Allow specifying local packages and building them against an LTS.

Not sure if config should be stack.yaml or a Haskell script.

Figure out story for Custom setup scripts

How should we support packages like proto-lens or gl that generate Haskell modules with a custom Setup file? Allow custom user rules? Actually just run their Setup script?

Some specific packages:

  • happy, alex: generate template data-files by compiling and running a program with different CPP flags.
  • pandoc: installs man page
  • semigroupoids, comonad, distributive: use cabal-doctest
  • lens: uses cabal-doctest, and also installs an image to be used by the haddocks
  • entropy: runs a test C program, not sure for what purpose
  • darcs: generates a custom Version.hs module for embedding more specific version information; also custom logic for linking against libiconv, similar to what used to be in haskeline
  • gtk2hs: packages like glib use gtk2hs-buildtools:Gtk2HsSetup

Make enabling verbosity more intuitive

It's hard to get just a list of the actual commands that were run, You can try -VVV which sometimes works, sometimes doesn't (due to uses of quietly, I think).

Configure the optimization level.

Currently the optimization level is hard-coded to -O0. Default to -O1 and allow setting it on the command-line and/or in stack.yaml.

Get LTS as a submodule

Make the LTS repo a submodule of stake, and have a function that loads the versions map from the corresponding data file.

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.