make: add targets to debug dependencies variables#12004
make: add targets to debug dependencies variables#12004fjmolinas merged 3 commits intoRIOT-OS:masterfrom
Conversation
|
Script added, I am running it right now. |
|
@fjmolinas you may be interested in this as I would like to use this for helping reviewing changes done with #11477 |
|
Running the script took 130m on my machine though. |
Can you give me the exact command you executed please. |
|
Sure, the command I used was: With |
|
I will change something. As I want to compare the output from the Otherwise it makes comparing way harder as concatenating all files and diff is invalid. |
|
If one currently wants to compare the output of the |
0ecad5f to
a6b45a0
Compare
|
I rebased due to conflicts in |
a6b45a0 to
19f538e
Compare
|
This PR was tested while reviewing #12092. |
|
Now that #11470 is merged, I could rebase this PR and integrate the content of the I did not before as it required removing erroneous files and preferred to be explicit in the testing PRs. |
Please do. |
dist/tools/buildsystem_sanity_check/save_all_dependencies_resolution_variables.sh
Show resolved
Hide resolved
makefiles/dependencies_debug.inc.mk
Outdated
| .PHONY: dependency_debug | ||
| # Only generate the dependencies when the board is not disabled | ||
| # This will allow comparing with the output of `info-boards-supported` more easily | ||
| dependency_debug: |
There was a problem hiding this comment.
Just a style remark, why "_" most recipe we have use "-" as far as I can tell.
There was a problem hiding this comment.
Indeed, will change.
makefiles/dependencies_debug.inc.mk
Outdated
| # The goal is to get the value of variables used for dependency resolution | ||
| # and the impact of refactoring | ||
|
|
||
| # Files output can be generated through `info-boards-supported` evaluation with |
There was a problem hiding this comment.
This returns incorrect resolution in some cases if I'm understanding right from your PR description, right?
There was a problem hiding this comment.
The script returns the resolutions from the build system, but the build system returns incorrect parsing when doing info-boards-supported as it ignores the content of boards/cpu/Makefile.include that are currently required.
There was a problem hiding this comment.
Maybe we need to add a note saying they are different and that there is a "correct" one, similar to your PR comment.
There was a problem hiding this comment.
I will flip the definitions to have the "normal" one first.
I will add it and remove the documentation explaining how to do it. |
|
I still kept the documentation in |
Ok, although I think this and many tools should somehow have there documentation more exposed, e.g. in |
You are right. I squash and add a reference in there. |
Add a 'dependency-debug' and a 'DEPENDENCY_DEBUG=1' option for 'info-boards-supported' to save some variables used when resolving dependencies. Print some some 'sorted' variables to simplify comparing the actual value when the parsing order changed. This should help tracking changes introduced when refactoring the dependency parsing.
Add a script saving all applications and boards dependency resolution variables and also aggregated files to compare between both dependencies handling. It is slow but should dump everything.
b4a49c7 to
7d0b922
Compare
fjmolinas
left a comment
There was a problem hiding this comment.
I have a single comment for the new doc, otherwise I think this PR is ok. If you agree with my suggestion please squash.
| Or with the version used by murdock to know supported boards to a | ||
| `dependencies_info-boards-supported_board_name` file: |
There was a problem hiding this comment.
Or with the "quick" version used by murdock (this is an incomplete resolution, details in makefiles/dependencies_debug.inc.mk):
There was a problem hiding this comment.
I changed it this way to still keep the rest of sentence.
I squash directly.
diff --git a/doc/doxygen/src/advanced-build-system-tricks.md b/doc/doxygen/src/advanced-build-system-tricks.md
index b5f0e9b67..c7614a8be 100644
--- a/doc/doxygen/src/advanced-build-system-tricks.md
+++ b/doc/doxygen/src/advanced-build-system-tricks.md
@@ -58,8 +58,9 @@ Generate the variables dump with the normal dependency resolution to a
BOARD=board_name make dependency-debug
~~~~~~~~~~~~~~~~~~~
-Or with the version used by murdock to know supported boards to a
-`dependencies_info-boards-supported_board_name` file:
+Or with the "quick" version used by murdock to know supported boards
+(this is an incomplete resolution, details in `makefiles/dependencies_debug.inc.mk`)
+to a `dependencies_info-boards-supported_board_name` file:
~~~~~~~~~~~~~~~~~~~
BOARDS=board_name DEPENDENCY_DEBUG=1 make info-boards-supportedAdd short documentation for the dependency resolution debug targets. Point to the main files for more infos.
040df2f to
9940a15
Compare
|
GO! |
|
Thank you for the review! |
Contribution description
Add a 'dependency_debug' and a 'DEPENDENCY_DEBUG=1' option for
'info-boards-supported' to save some variables used when resolving
dependencies.
This should help tracking changes introduced when refactoring the
dependency parsing.
Testing procedure
As described in the file documentation:
The goal is to get the value of variables used for dependency resolution
and the impact of refactoring
Files output can be generated through
info-boards-supportedevaluation withAnd for each board in the normal make context with
To compare in an aggregated file, you can run in an application directory:
"Funny" things:
Right now, the quick "resolution" done by murdock to know which boards are supported is using a subset of the values it must be using.
USEMODULEdoes not have all the modules and someFEATURES_REQUIREDare absent.It can easily be seen already with one board in
examples/hello-worldIssues/PRs references