-
-
Notifications
You must be signed in to change notification settings - Fork 316
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
Remove generated build artifacts from git repository #1065
Comments
But please do not remove the (Make-generated) shell completion scripts (under
-- from documentation Because it takes a noticable time to generate the completions. hledger is executed with Also, they are not generated from the root Makefile. |
@schoettl Please excuse me if I'm being dense, but in my experience with make (which is actually quite a bit, but certainly not exhaustive) the entire goal is to have a chain of rules that understand exactly when something needs to be regenerated (and when it doesn't) based on what source files have changed vs. what objects are created in the end. I don't understand either why having or not having generated artifacts committed to the git repository would have any effect at all on the situation your describing. |
The only make rule, I can think of, that takes dependencies into account, is "Generate the completion scripts whenever hledger binary has changed." But actually (as quoted above), the scripts should only be generated, when the CLI changes (i.e. the options and sub-commands). Because this step takes so much time, it should not be executed on every hledger binary change. For me, generating the completion scripts is more like a version bump. And Otherwise, which make target do you propose? |
@schoettl As best I can make out I think you're conflating two different issues. I don't think what I'm proposing here will have a substantial impact on the issue you are raising. I'm not exactly sure what piece you're missing, but maybe some of these comments will help sort out what is what.
Hopefully something in there helps sort out what is what. If not I'd be interested in hearing what exactly the workflow is that you are concerned will be degraded by my proposal. |
Can I ask again, what build rule do you suggest?
I want the shell completion to be promoted and used because they are new and very handy. If the artifacts are not committed, I see the danger that
In addition, as long the completions are not packaged for distros, they should be downloadable for users. Users should not have to generate them. Where is the tarball you mentioned? Where can it be downloaded and where is it generated? I don't know if the completion scripts are in there. |
No need to worry unduly - this is just a placeholder proposal, with experimentation to follow, I imagine focussed on the command docs at first. We will compare cost/benefit against the status quo.
|
@schoettl I wasn't actually proposing a build rule per-se. Those should already all exist. This issue was only to propose removing build artifacts from git where they cause a lot of duplication, clutter, and extraneous commits that make the development process harder to follow — something that is almost entirely orthogonal to how the build rules are configured. This is about where and how artifacts are stored, not how and when they are built. That being said it's apparent there are likely issues with build rules as well that may get fixed along the way, but what I'm trying to say is that these aren't really part of the same issue. About your workflow points...
The "source" tarballs with source format conversions as required by some packaging systems that have no "build" mechanism is not something that exists yet, I'm proposing fixing that. |
I'm seeing about 1.2 seconds run time for If there are any relevant concerns that I'm missing please feel free to note them on the dedicated issue I just opened. |
Did you refer to the Makefile in shell-completion/? At my computer it takes more than 8 seconds.
For packaging or installing, sure a few seconds are OK. |
I'm a little surprised at that number @schoettl as my test system is running a budget level CPU released in 2012, and the system built around it is pretty pedestrian by today's standards. I sounds like there is probably something outright wrong going on there, but I'm not sure where to start. There appear to be ~40 invocations of the |
I don't know. Arch Linux on ThinkPad with Intel core i5. |
@schoettl Can you perhaps try a very crude benchmark to see you have an unexpected bottleneck either with instantiating hledger itself or with doing so in parallel like this: $ time (seq 1 100 | xargs -iX -n1 hledger > /dev/null)
18.03s user 1.22s system 96% cpu 19.881 total
$ time (seq 1 100 | parallel -j8 'hledger > /dev/null #{}')
22.11s user 1.42s system 553% cpu 4.252 total Everything else I see other than these basic operations is a bunch of small shell and utility processes that tend to be pretty fast (but they do add up). I'm taking a guess, but I suspect your speed problem will manifest itself in one or both of those two operations and the other little bits just exacerbate the base operation being too slow. |
Both benchmarks make CPU fans being loud. And there is not so much difference... |
This is more of a note to self rather than a request for anybody else to do this work so feel free to assign this issue to me.
There is a ton of duplicated content committed to the repository in files that are just format conversions of each-other (largely using Pandoc). These should ideally be stripped and the build process should make them as a matter of course. This may include generating a source tarball generator that includes these initial build steps (in addition to one that has fully built binaries) or setting up CI artifacts somewhere predictable with the extra formats available for packagers that don't want to have the whole build toolchain.
The text was updated successfully, but these errors were encountered: