Skip to content

Conversation

@edmocosta
Copy link
Contributor

@edmocosta edmocosta commented Mar 10, 2025

Description

Fixes the checklicense target as it's using spaces instead of tabs, leading the checklicense target to skip the header's verifications as the variable is not properly working. The addlicense target is also printing the following errors, which is probably being caused by syntax currently used to try to set target-scoped variables:

ALL_SRC_AND_SHELL := find . -type f \( -iname '*.go' -o -iname "*.sh" \) ! -path '**/third_party/*' | sort
/bin/bash: ALL_SRC_AND_SHELL: command not found

@edmocosta edmocosta marked this pull request as ready for review March 10, 2025 14:05
@edmocosta edmocosta requested a review from a team as a code owner March 10, 2025 14:05
@edmocosta edmocosta requested a review from atoulme March 10, 2025 14:05
@edmocosta edmocosta changed the title [chore] Fix addlicense and checklicense targets [chore] Fix addlicense and checklicense Makefile targets Mar 10, 2025
@edmocosta
Copy link
Contributor Author

edmocosta commented Mar 10, 2025

Red CI means it worked, which is an unusual thing to say!

Screenshot 2025-03-10 at 15 15 48

I'll run make addlicense to get lint fixed.

@edmocosta edmocosta force-pushed the fix-makefile-license-targets branch from f14ccec to fb4409b Compare March 10, 2025 14:58
@dehaansa
Copy link
Contributor

These were recently moved into individual tasks here #37951 . Can we fix the issues without reintroducing the previous slow make behavior? CC @atoulme

@edmocosta
Copy link
Contributor Author

I'm not a Make expert, but this approach is slightly different from the previous one. The find command should only be executed when it expands the variable value (usages), so it shouldn't slow down other targets. Another option would be setting it at target level, but I think that would require using eval.

@mx-psi mx-psi merged commit 2a64804 into open-telemetry:main Mar 11, 2025
171 checks passed
@github-actions github-actions bot added this to the next release milestone Mar 11, 2025
atoulme pushed a commit that referenced this pull request Mar 19, 2025
Re-enable the use of `make` for the `hostmetricsreceiver` by fixing the
target that was being suppressed.

For targets `misspell` and `misspell-correction` there is no need
anymore of a different version for Windows.

For targets `addlicense` and `checklicense` we can't have a computed
variable with all the filenames since this becomes too big for
`/bin/bash`. I changed it back to the same pattern used in #37951.

I tested on Windows and Mac and the issue described at #38493 didn't
repro with this current change.
lightme16 pushed a commit to lightme16/opentelemetry-collector-contrib that referenced this pull request Mar 19, 2025
…try#38773)

Re-enable the use of `make` for the `hostmetricsreceiver` by fixing the
target that was being suppressed.

For targets `misspell` and `misspell-correction` there is no need
anymore of a different version for Windows.

For targets `addlicense` and `checklicense` we can't have a computed
variable with all the filenames since this becomes too big for
`/bin/bash`. I changed it back to the same pattern used in open-telemetry#37951.

I tested on Windows and Mac and the issue described at open-telemetry#38493 didn't
repro with this current change.
Fiery-Fenix pushed a commit to Fiery-Fenix/opentelemetry-collector-contrib that referenced this pull request Apr 24, 2025
…try#38773)

Re-enable the use of `make` for the `hostmetricsreceiver` by fixing the
target that was being suppressed.

For targets `misspell` and `misspell-correction` there is no need
anymore of a different version for Windows.

For targets `addlicense` and `checklicense` we can't have a computed
variable with all the filenames since this becomes too big for
`/bin/bash`. I changed it back to the same pattern used in open-telemetry#37951.

I tested on Windows and Mac and the issue described at open-telemetry#38493 didn't
repro with this current change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants