-
Notifications
You must be signed in to change notification settings - Fork 22
Improve generated .ebuild output
#132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
@solpeth, I'd like you to take a look at the golden/example I selected these because they should cover the full range of issues we've been experiencing for generated ebuilds. They will serve as a template for how generated ebuilds should look:
Edit: @thesamesam if you have any input on how to improve the formatting of these example ebuilds, I'd be interested in your opinion. |
|
This data is fed into |
d31b93e to
3481040
Compare
0d73e92 to
16e5b05
Compare
37f5913 to
bcf12ee
Compare
|
@049940 ❓ |
This will assist testing by allowing EBuild data to be read from a file Signed-off-by: hololeap <[email protected]>
Signed-off-by: hololeap <[email protected]>
Signed-off-by: hololeap <[email protected]>
bcf12ee to
f8c75ff
Compare
Add "golden" tests which compare generated output to example ebuild files. This will help aid development of improvements for ebuild output. Signed-off-by: hololeap <[email protected]>
- Use an asterisk at the end of the version when possible - Add newline to DEPEND - Avoid backslashes by passing an array to src_configure - Drop trailing .0 components Thanks-to: Sam James <[email protected]> Signed-off-by: hololeap <[email protected]>
Some rendering utility functions and Prettyprinter re-exports Signed-off-by: hololeap <[email protected]>
Drop unused functions in Portage.Ebuild and associated test Signed-off-by: hololeap <[email protected]>
LinesBuilder is a custom Monad that works by building up a list of prettyprinter Docs and then concats them with vcat. It is helpful for when a logical piece of the ebuild may use a variable number of lines, including no lines at all (for instance when no CABAL_HACKAGE_REVISION or CABAL_PN are used). Improve some formatting Signed-off-by: hololeap <[email protected]>
Signed-off-by: hololeap <[email protected]>
Wildcard matches save on characters, but they look messy in diffs when an upper bound gets bumped for a dependency. Signed-off-by: hololeap <[email protected]>
f8c75ff to
cb1e4b0
Compare
This is a PR for generally improving the quality of generated
.ebuildfiles. Example.ebuildfiles have been added for "golden" testing. Moving forward, these will serve as guidelines or templates for how we want.ebuildfiles to look.We can leverage the use of the
prettyprinterpackage, which won't add much dependency footprint since it is also needed byoptparse-applicative. This will be very useful for improving theshowEBuildfunction (shown partially here).hackport/src/Portage/EBuild.hs
Lines 98 to 103 in df86a22
||inbuild-depends#127