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

Calculate preprocessor symbols #2439

Closed
wants to merge 5 commits into from
Closed

Conversation

aholstrup1
Copy link
Contributor

@aholstrup1 aholstrup1 commented Dec 3, 2024

Summary

Calculate CLEAN tags instead of using list

Work Item(s)

Fixes AB#559429

@github-actions github-actions bot added Build: Automation Workflows and other setup in .github folder Build: scripts & configs Build scripts and configuration files labels Dec 3, 2024
@github-actions github-actions bot added this to the Version 26.0 milestone Dec 3, 2024
@aholstrup1 aholstrup1 marked this pull request as ready for review December 3, 2024 13:22
@aholstrup1 aholstrup1 requested a review from a team as a code owner December 3, 2024 13:22
Copy link
Contributor

@mazhelez mazhelez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Left a comment that implies that cleanModePreprocessorSymbols setting might not be needed anymore.

I suppose it's required by AL-Go.
Can we instead set it so that cleanModePreprocessorSymbols is updated every time there is a major version change? What do you think?

build/scripts/GuardingV2ExtensionsHelper.psm1 Outdated Show resolved Hide resolved
.github/actions/TestPreprocessorSymbols/action.ps1 Outdated Show resolved Hide resolved
@@ -53,6 +53,8 @@ if($appType -eq 'app')
else {
Compile-AppInBcContainer @tempParameters | Out-Null
}

$parameters.Value["preprocessorsymbols"] = Get-PreprocessorSymbols
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the clean tags are set here, what's the point of cleanModePreprocessorSymbols setting?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None. They're not used. But AL-Go fails if we don't set anything.

Maybe we should just write a warning here instead of throwing an error?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a defensive check, so not sure about a warning. How would you fix such a warning?

But why automation PRs? 🤔
My idea was just to add a check (in "Verify App Changes" maybe) that the cleanModePreprocessorSymbols are in order, based on the current version.
Then, to be on the safe side, Get-PreprocessorSymbols can dynamically add CLEAN preprocessor symbols for all versions between the current version and the version on main.

Generally speaking, CLEAN26 makes no sense in version 25. But so do all the clean builds we do all around, but main.

@aholstrup1
Copy link
Contributor Author

Looks good. Left a comment that implies that cleanModePreprocessorSymbols setting might not be needed anymore.

I suppose it's required by AL-Go.
Can we instead set it so that cleanModePreprocessorSymbols is updated every time there is a major version change? What do you think?

I don't hate the idea, but it does imply more automation PRs and for that reason I'm hesitant.

@aholstrup1
Copy link
Contributor Author

Closing for now

@aholstrup1 aholstrup1 closed this Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build: Automation Workflows and other setup in .github folder Build: scripts & configs Build scripts and configuration files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants