bodigrim / cabal-add Goto Github PK
View Code? Open in Web Editor NEWExtend Cabal build-depends from the command line
Home Page: https://hackage.haskell.org/package/cabal-add
License: BSD 3-Clause "New" or "Revised" License
Extend Cabal build-depends from the command line
Home Page: https://hackage.haskell.org/package/cabal-add
License: BSD 3-Clause "New" or "Revised" License
In line with the usual Cabal CLI, remove --cabal-file
, add --project-file
:
--project-file
has been specified, parse it.
--project file
appears to be a Cabal file, go for it without complaints.--project-file
is not specified, look for cabal.project
in the current folder.cabal.project
is not found, look for *.cabal
in the current folder.readProject
provides us pretty much everything we need.
If a component target is not a common stanza then instead of resolving components on our own, we should use readBuildTargets
from Cabal
.
Since haskell/haskell-language-server#4360 adds a CodeAction which utilises cabal-add
to add a dependency to a .cabal
file, it would be much easier for HLS (especially when HLS does a Hackage release) if cabal-add
was released to Hackage as well.
While we are not releasing right now, this issue aims to track a potential Hackage release.
cc @VenInf
The cabal-add
tool looks up the cabal file by searching the current working directory.
I want to add the cabal-add tool to the hls and it would be very beneficial to have a way of specifying the path to the cabal file.
To my understanding, the --project-file
is not related to this request (and also I failed to make this option work in this scenario).
Make --component
optional: if a first positional argument can be parsed as a component target, do so. E. g., cabal-add tests bytestring
should be equivalent to cabal-add --component tests bytestring
.
This makes CLI more uniform with the usual Cabal conventions, which pass build targets positionally.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.