-
Notifications
You must be signed in to change notification settings - Fork 47
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
[REBASE&FF] Multiple table / parser updates #423
Merged
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
Javagedes
force-pushed
the
parser-updates
branch
2 times, most recently
from
October 3, 2023 17:19
ff4f297
to
95c44ae
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #423 +/- ##
==========================================
+ Coverage 80.99% 81.13% +0.14%
==========================================
Files 57 57
Lines 7286 7338 +52
==========================================
+ Hits 5901 5954 +53
+ Misses 1385 1384 -1
☔ View full report in Codecov by Sentry. |
Javagedes
force-pushed
the
parser-updates
branch
from
October 4, 2023 18:06
6a20edf
to
85ce665
Compare
Javagedes
force-pushed
the
parser-updates
branch
from
October 9, 2023 16:03
3a626ee
to
b584683
Compare
cfernald
approved these changes
Oct 25, 2023
Javagedes
force-pushed
the
parser-updates
branch
4 times, most recently
from
November 1, 2023 23:33
e799eda
to
2cf5b37
Compare
Resolves paths containing ".." in source files before inserting into the database to get the correct relative path from a package (or ws root).
The dsc_parser does not filter on arch, so we need to do it in the instanced_inf_table to ensure we are not filling the instanced_inf table with architecture entries that are not relevant to the current build.
to properly scope components to a specific architecture when they fell under a common section, the parser relied on TARGET_ARCH being provided as a InputVar via SetInputVars(). This came with two problems: (1) It was not garunteed that TARGET_ARCH would be provided, which would result in the component registered for any scope and (2) it limited the results to particular architecture rather than the actual supported architecture per the DSC. This commit changes the parser to use the SUPPORTED_ARCHITECTURES define as set in the DSC itself, which is a required DEFINE per the DSC specification.
Adds additional parsing to the inf_parser to support scoped source files which can be retrieved via the function get_sources(arch_list), which will return all sources used for a given arch(s). Re-writes the logic that does the same for scoped libraries to make it more extensible, but no user facing changes. Updates instanced_inf_table to use the new function to get the sources.
Previously, the INF parser did not support detecting DEFINE variables or replacing $(variable) with the value of the variable, similar to other parsers. This change adds support for this feature, and assocaited tests to ensure it works as expected.
Attempts to retrive the repository name from the url associated with either the origin or the first remote if the origin does not exist. If that fails, it will continue to resort to BASE.
Javagedes
force-pushed
the
parser-updates
branch
from
November 1, 2023 23:33
2cf5b37
to
d17af12
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.
Contains multiple commits to improve
instanced_table
,instanced_inf_table
, anddsc_parser
.Commit 1: inf_table.py: resolve dot-dot paths in source files
Updates inf_table.py to resolve dot-dot paths in source files before inserting it into the database to ensure the path is a valid edk2 package path relative path. Source files in the database are now edk2 package relative rather than inf relative.
Commit 2: instanced_inf_table.py: Filter on TARGET_ARCH
The dsc_parser is architecture agnostic and resolves the dsc file for all architectures it supports. This means the instanced_inf_table must filter the results to only the architectures specified by the Settings file.
Commit 3: dsc_parser.py: use SUPPORTED_ARCHITECTURES
The dsc_parser relied on TARGET_ARCH when creating scoped libraries and components, but it should rely on SUPPORTED_ARCHITECTURES which provides information true to the DSC.
Commit 4: inf parsing: Add support for scoped source files
Adds additional parsing to the inf_parser to support scoped source files
which can be retrieved via the function get_sources(arch_list), which
will return all sources used for a given arch(s). Re-writes the logic
that does the same for scoped libraries to make it more extensible, but
no user facing changes.
Updates instanced_inf_table to use the new function to get the sources.
Commit 5: inf_parser: Add ReplaceVariable support
Previously, the INF parser did not support detecting DEFINE variables or
replacing $(variable) with the value of the variable, similar to other
parsers. This change adds support for this feature, and assocaited tests
to ensure it works as expected.