Giter VIP home page Giter VIP logo

cabal-cargs's People

Contributors

dan-t avatar emilaxelsson avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

cabal-cargs's Issues

cabal.sandbox.config

I'm really excited to see this project.

I was wondering if it's possible to add cabal.sandbox.config support. Namely extracting enough from it to support hdevtools in vim.

Let me just explain how I've got things set up, as some background.

records_stuff/
├── .cabal-sandbox
├── Vinyl
├── cabal.sandbox.config
├── http-pokemon
└── vinyl-json

How I set up my sandbox

cd records_stuff/
cabal sandbox init
for package in $packages; do
    cd $package
    cabal sandbox init --sandbox ../.cabal-sandbox/
    cd ..
    cabal sandbox add-source $package
done

I'd like to have hdevtools just work.
My previous vimscripts don't quite work, as I don't own Vinyl, and they don't use a src/ directory, but I'm doing a little work on it. My packages do use src. I thought it'd be nice if I could just extract the hs-source-dirs from the cabal files, and that's when I found your tool and was happy that someone did this kind of thing before. Unfortunately there's still some errors importing packages.

If I look at a (cleaned up) `g:hdevtools_options

-g-i/Users/theobelaire/Code/Haskell/records_stuff/http-pokemon/src
-g-XHaskell2010
-g-i/Users/theobelaire/Code/Haskell/records_stuff/http-pokemon/dist/dist-sandbox-f83aa2ea/build/autogen
-g-I/Users/theobelaire/Code/Haskell/records_stuff/http-pokemon/dist/dist-sandbox-f83aa2ea/build/autogen
-g-optP-include
-g-optPcabal_macros.h
--socket=/Users/theobelaire/Code/Haskell/records_stuff/http-pokemon/.hdevtools.sock

Which seems to have no knowledge of the sandbox at all. I'd like to fix that. First, I suppose, is figuring out what options need to pass to make it work at all, then how to generate them from the various cabal files.

Over-specified version restrictions

cabal-cargs places the following restrictions on its build inputs: either >=4.1.1 && <4.2,lens >=4.0.1 && <4.1, andtasty ==0.7.*`. However, after removing these restrictions from the Cabal file, the build succeeds just fine with the respective latest version of these packages. Are you sure those limitations are accurate?

Support builds that use `cabal new-build`

It would be nice to be able to get paths in the dist-newstyle directory when that is being used. I noticed that cabal-lenses has a function findNewDistDir, but that won't work out of the box since dist-newstyle has a different structure than dist. For example, the build directory is found in something like:

dist-newstyle/build/x86_64-linux/ghc-8.4.3/my-package-0.1/build/

Do you think there's a way to make this work?

Add option to print the root of the Cabal package

I'm working on an approach to Haskell development in simple editors. I need two things to make it work:

  • cabal-cargs
  • A way to find the root of the current Cabal package

It would be nice if a single tool could do both things. Would you accept a PR that adds a flag to make cabal-cargs print the directory of the Cabal file?

I realize that this doesn't fit with the normal operation of cabal-cargs, so my other option would be to make a new tool that wraps cabal-cargs and adds the extra functionality. It's really up to what you'd prefer 🙂

Cabal dependency - Wai-Handler-Devel

Is it possible to downgrade dependency on cabal to start from >= 1.16 ?

I want to use Scotty + Wai-Handler-Devel for my devel env, but I cant, because it Wai-Handler-Devel dependencies invokes unresolvable state. This package is deprecated now, so my only hope - is you.

Thank you

Generation of -package option for module being developed

Running cabal-cargs --format=ghc -r on a cabal project with a test-suite depending on the library being tested outputs -package=<LIBRARY> where <LIBRARY> is the library being tested. So for example if you develop a library called "my-library" with a test-suite depending on the library <LIBRARY> is substituted by "my-library". This is bad, as it requires the library being installed already by cabal install my-library or else one gets an error <command line>: cannot satisfy -package my-library

So it would be quite nice if cabal-cargs would suppress the library under test from its -package output. What do you think?

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.