Skip to content
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

Sort includes when generating multiple files #2363

Merged
merged 1 commit into from
Nov 29, 2022

Conversation

ruricolist
Copy link
Contributor

Currently, when generating multiple files, it is possible for Datalog changes to result in spurious changes to otherwise unchanged generated files due to headers being reordered. This PR ensures that headers are always emitted in alphabetical order.

In my tests this reduces the number of files that need to be recompiled after a Datalog change by 15-20%.

Copy link
Member

@b-scholz b-scholz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the improvement!

@codecov
Copy link

codecov bot commented Nov 29, 2022

Codecov Report

Merging #2363 (1dd3cc8) into master (3047414) will increase coverage by 0.06%.
The diff coverage is 87.50%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2363      +/-   ##
==========================================
+ Coverage   77.43%   77.49%   +0.06%     
==========================================
  Files         470      467       -3     
  Lines       29332    30684    +1352     
==========================================
+ Hits        22713    23779    +1066     
- Misses       6619     6905     +286     
Impacted Files Coverage Δ
src/synthesiser/GenDb.h 93.75% <78.26%> (-1.34%) ⬇️
src/main.cpp 69.49% <100.00%> (+0.27%) ⬆️
src/synthesiser/GenDb.cpp 97.15% <100.00%> (+1.09%) ⬆️
src/synthesiser/Synthesiser.cpp 84.78% <100.00%> (-0.13%) ⬇️
src/ast/utility/Utils.h 85.71% <0.00%> (-14.29%) ⬇️
src/ram/utility/NodeMapper.cpp 88.88% <0.00%> (-11.12%) ⬇️
src/ram/TranslationUnit.cpp 33.33% <0.00%> (-6.67%) ⬇️
src/ast/transform/Meta.cpp 60.00% <0.00%> (-6.67%) ⬇️
src/ast/analysis/SCCGraph.h 93.75% <0.00%> (-6.25%) ⬇️
src/ast/QualifiedName.h 94.11% <0.00%> (-5.89%) ⬇️
... and 194 more

@b-scholz b-scholz merged commit 5e232fd into souffle-lang:master Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants