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

Add a directory tracker to the CBS Makefile builder #1071

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jonahgraham
Copy link
Member

Messages such as "make: Entering directory" are now processed so that the scanner info builder knows the correct full path to use for build.

Without this code calls to ToolChain.getResourcesFromCommand() would pass in the wrong directory and resources could not be reliably calculated. With the incorrect calculation the scanner info does not get applied to the file correctly and the file cannot be indexed reliably.

TODO:

  • Decide how to handle make -j as "make: Entering directory" becomes unreliable
  • Consider whether we should search project for resources so that the exact build directory is less important
  • Consider how to report back to the user that the detected resource was not found in the project.

Messages such as "make: Entering directory" are now processed so
that the scanner info builder knows the correct full path to use
for build.

Without this code calls to ToolChain.getResourcesFromCommand() would
pass in the wrong directory and resources could not be reliably
calculated. With the incorrect calculation the scanner info does
not get applied to the file correctly and the file cannot be indexed
reliably.

TODO:

- [ ] Decide how to handle make -j as "make: Entering directory"
becomes unreliable
- [ ] Consider whether we should search project for resources
so that the exact build directory is less important
- [ ] Consider how to report back to the user that the detected
resource was not found in the project.
Copy link

github-actions bot commented Feb 2, 2025

Test Results

   600 files  ±0     600 suites  ±0   13m 36s ⏱️ +15s
10 206 tests ±0  10 183 ✅ ±0  23 💤 ±0  0 ❌ ±0 
10 244 runs  ±0  10 221 ✅ ±0  23 💤 ±0  0 ❌ ±0 

Results for commit 84cf19c. ± Comparison against base commit c8e47b3.

@jonahgraham
Copy link
Member Author

TODO:

  • Decide how to handle make -j as "make: Entering directory" becomes unreliable
  • Consider whether we should search project for resources so that the exact build directory is less important
  • Consider how to report back to the user that the detected resource was not found in the project.

I think these TODO items can be split into future issues. When reviewing please let me know if you think they need to be dealt with.

@jonahgraham jonahgraham marked this pull request as ready for review February 2, 2025 17:53
@jonahgraham
Copy link
Member Author

@ewaterlander can you have a look at this? Do you have the issues of changing directories in the middle of the build?

BTW I have a handful of patches to Makefile flow in CBS as I am trying to dogfood while working on eclipse-equinox/equinox#831 (comment)

@ewaterlander
Copy link
Contributor

Hi @jonahgraham

We typically don't do directory changes in our builds, so I did not see this issue.
This change LGTM.

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