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

[NFC] Generate separate tables via macro #137

Merged
merged 2 commits into from
Oct 12, 2020

Conversation

gchatelet
Copy link
Collaborator

@gchatelet gchatelet commented Oct 10, 2020

This is a non functional change, it allows:

  • Getting rid of unix_features_aggregator
  • Have a single blob describing the features
  • Fix wrong mocking of hwcaps

Downside: abuse of macros makes the code slightly magical and harder to understand.
It think it's still an improvement over the current situation as there's less repetition and less chances to get something wrong.

@gchatelet
Copy link
Collaborator Author

@Mizux clang-format Check is unhappy with deleted files :-/

@Mizux
Copy link
Collaborator

Mizux commented Oct 11, 2020

@Mizux clang-format Check is unhappy with deleted files :-/

We should use something like this in the job

git diff --diff-filter=ACMRTUXB

i.e. filter out D aka deleted files

man git:

       --diff-filter=[(A|C|D|M|R|T|U|X|B)...[*]]
           Select only files that are Added (A), Copied (C), Deleted (D), Modified (M), Renamed (R), have their type
           (i.e. regular file, symlink, submodule, ...) changed (T), are Unmerged (U), are Unknown (X), or have had
           their pairing Broken (B). Any combination of the filter characters (including none) can be used. When *
           (All-or-none) is added to the combination, all paths are selected if there is any file that matches other
           criteria in the comparison; if there is no file that matches other criteria, nothing is selected.

           Also, these upper-case letters can be downcased to exclude. E.g.  --diff-filter=ad excludes added and
           deleted paths.

           Note that not all diffs can feature all types. For instance, diffs from the index to the working tree can
           never have Added entries (because the set of paths included in the diff is limited by what is in the
           index). Similarly, copied and renamed entries cannot appear if detection for those types is disabled.

@gchatelet gchatelet force-pushed the test_macros_to_generate_separate_tables branch 2 times, most recently from 674dccd to 7f940e0 Compare October 12, 2020 08:20
@gchatelet gchatelet requested a review from Mizux October 12, 2020 08:20
src/define_tables.h Outdated Show resolved Hide resolved
@gchatelet gchatelet force-pushed the test_macros_to_generate_separate_tables branch from 7f940e0 to ae92a37 Compare October 12, 2020 08:58
@gchatelet gchatelet merged commit 9a8f04b into master Oct 12, 2020
@gchatelet gchatelet deleted the test_macros_to_generate_separate_tables branch October 12, 2020 09:50
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