Improve generated .ebuild output#132
Open
hololeap wants to merge 15 commits intogentoo-haskell:masterfrom
Open
Improve generated .ebuild output#132hololeap wants to merge 15 commits intogentoo-haskell:masterfrom
.ebuild output#132hololeap wants to merge 15 commits intogentoo-haskell:masterfrom
Conversation
Member
Author
|
@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. |
Member
Author
|
This data is fed into |
d31b93e to
3481040
Compare
0d73e92 to
16e5b05
Compare
37f5913 to
bcf12ee
Compare
049940
approved these changes
Aug 7, 2024
Member
Author
|
@049940 ❓ |
This will assist testing by allowing EBuild data to be read from a file Signed-off-by: hololeap <hololeap@users.noreply.github.com>
Signed-off-by: hololeap <hololeap@users.noreply.github.com>
Signed-off-by: hololeap <hololeap@users.noreply.github.com>
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 <hololeap@users.noreply.github.com>
- 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 <sam@gentoo.org> Signed-off-by: hololeap <hololeap@users.noreply.github.com>
Some rendering utility functions and Prettyprinter re-exports Signed-off-by: hololeap <hololeap@protonmail.com>
Drop unused functions in Portage.Ebuild and associated test Signed-off-by: hololeap <hololeap@protonmail.com>
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 <hololeap@protonmail.com>
Signed-off-by: hololeap <hololeap@protonmail.com>
Wildcard matches save on characters, but they look messy in diffs when an upper bound gets bumped for a dependency. Signed-off-by: hololeap <hololeap@protonmail.com>
f8c75ff to
cb1e4b0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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