-
Notifications
You must be signed in to change notification settings - Fork 149
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
Fix the REUSE.toml performance regression (+ do a whole lot of refactoring) #1047
Merged
Conversation
This file contains 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
carmenbianca
force-pushed
the
performance-toml
branch
from
July 8, 2024 15:32
94cfe20
to
3261c44
Compare
I want to stop passing edit: I was not successful. |
carmenbianca
force-pushed
the
performance-toml
branch
from
July 9, 2024 17:17
5d7759f
to
875bba6
Compare
There is a light contradiction with the spec: |
This was referenced Jul 9, 2024
Closed
4 tasks
carmenbianca
force-pushed
the
performance-toml
branch
from
September 18, 2024 13:04
60e691c
to
6d40fd8
Compare
Hooray! This had always been bad design. Signed-off-by: Carmen Bianca BAKKER <carmenbianca@fsfe.org>
This is kind of annoying, but it is necessary for some work I want to do in global_licensing. Fortunately this was surprisingly easy; iter_files is the first function ever written for REUSE, so I expected that it would be more tangled up. Signed-off-by: Carmen Bianca BAKKER <carmenbianca@fsfe.org>
Signed-off-by: Carmen Bianca BAKKER <carmenbianca@fsfe.org>
Signed-off-by: Carmen Bianca BAKKER <carmenbianca@fsfe.org>
Previously, the glob **/REUSE.toml would search _all_ directories, including big directories containing build artefacts that are otherwise ignored by VCS. This commit uses the same logic to find REUSE.toml as any other file is found. It's not super rapid, but it does a heap more filtering. Signed-off-by: Carmen Bianca BAKKER <carmenbianca@fsfe.org>
Signed-off-by: Carmen Bianca BAKKER <carmenbianca@fsfe.org>
In _main, find_global_licensing was called to find the file that contained some parsing error. This may have contained false information in the case of multiple REUSE.tomls. Instead of needlessly calling this function, the errant file is now an attribute on the exception. Signed-off-by: Carmen Bianca BAKKER <carmenbianca@fsfe.org>
Previously this function would be called three times on a lint: - once by NestedReuseTOML.find_reuse_tomls in Project.find_global_licensing - once by NestedReuseTOML.find_reuse_tomls in NestedReuseTOML.from_file - once to lint all the files I now no longer use NestedReuseTOML.from_file. It's still not ideal to go over all files twice, but it's better than thrice. Signed-off-by: Carmen Bianca BAKKER <carmenbianca@fsfe.org>
carmenbianca
force-pushed
the
performance-toml
branch
2 times, most recently
from
September 18, 2024 13:15
fef5f20
to
dccf077
Compare
Signed-off-by: Carmen Bianca BAKKER <carmenbianca@fsfe.org>
This cleanup is the result of a rebase. It would be more effort to incorporate these fixes into their original commits. Signed-off-by: Carmen Bianca BAKKER <carmenbianca@fsfe.org>
carmenbianca
force-pushed
the
performance-toml
branch
from
September 18, 2024 13:19
dccf077
to
9a237f4
Compare
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.
Fixes #1033
Relevant to fsfe/reuse-website#85
This is my attempt at fixing #1033. It necessitates a whole lot more shuffling things around than I had anticipated.
changelog.d/<directory>/
.the current specification.
changed files.