-
Notifications
You must be signed in to change notification settings - Fork 173
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
refactor: change project flag configuration behavior #1451
Open
scolsen
wants to merge
6
commits into
carp-lang:master
Choose a base branch
from
scolsen:feat/configuration
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Commits on Jan 27, 2023
-
Fixes `(Project.get-config "cflags")` so that it actually returns the project's C flag field. Previously it was returning the project's preprocessor calls.
Configuration menu - View commit details
-
Copy full SHA for b0c0093 - Browse repository at this point
Copy the full SHA b0c0093View commit details -
refactor!: change project flag setting behavior
This commit alters the project configuration compiler flag setting behavior to allow users to override default project flags. Flag setting commands (cflag, libflag, pkgconfigflag) now take lists of strings as arguments. Previously, they were append-only and accepted string arguments. Now, to override flags, users can call: ``` (Project.get-config "cflag") => (...a bunch of default platform flags; "-wall" ...) (Project.config "cflag" '("-my" "-new" "-flags")) (Project.get-config "cflag") => ("-my" "-new" "-flags") ``` In order to append flags, users now need to `cons` to a `config-get`: ``` (Project.config "cflag" (cons "-new" (Project.get-config "cflag"))) ``` BREAKING CHANGE: Code that relies on the previous behavior will break, as calling these functions with non-list arguments is now an error. I considered a softer path whereby we'd overload the current behavior to avoid breaking existing users; however, the result would be confusing. Passing a list would result in overriding the project field while passing a single string would result in an append. A user might conceivably wonder why passing a list doesn't result in a multi-append. Ultimately I felt making a breaking change would be less confusing than this compatibility preserving behavior down the line.
Configuration menu - View commit details
-
Copy full SHA for 74d0321 - Browse repository at this point
Copy the full SHA 74d0321View commit details -
Provides convenience macros for appending flags to project flag fields cflag, libflag, and pkgconfigflag.
Configuration menu - View commit details
-
Copy full SHA for 57f1117 - Browse repository at this point
Copy the full SHA 57f1117View commit details
Commits on Jan 31, 2023
-
fix: update flag-setting calls to reflect behavior changes
Updates some project configuration calls in the Core library to follow the new configuration behavior (pass complete flag sets and not individual strings).
Configuration menu - View commit details
-
Copy full SHA for e5c9be7 - Browse repository at this point
Copy the full SHA e5c9be7View commit details -
To account for the new flag setting configuration behavior.
Configuration menu - View commit details
-
Copy full SHA for 09565f0 - Browse repository at this point
Copy the full SHA 09565f0View commit details -
fix: temporary kludge for clang
Adds a preload eval to set the -Wnounknown-warning-option flag in clang -- this way, when different versions don't support our default flag set, they can still run tests. Otherwise passing an unknown flag to clang results in a compilation error.
Configuration menu - View commit details
-
Copy full SHA for a28385a - Browse repository at this point
Copy the full SHA a28385aView commit details
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.