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

[pull] master from carp-lang:master #9

Merged
merged 1 commit into from
Mar 23, 2022
Merged

Conversation

pull[bot]
Copy link

@pull pull bot commented Mar 23, 2022

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

* refactor: project configuration get/set parity

This commit refactors our handling of project configuration
getters/setters in hopes of making it easier to ensure fields that have
getters have setters and vice versa, and to ensure field keys are
consistent across the Project.config and get-config commands.

This commit also makes these commands return XObjs for all calls,
instead of coercing certain things into strings and also adds getters
for fields that previously lacked them, e.g.:

    (Project.get-config "libflags")
    => ("-lm")

I've maintained parity with existing behaviors to avoid breaking
changes, thus, this works as it did before this commit:

    (Project.config "libflags" "-lfoo")
    (Project.get-config "libflags")
    => ("-lm" "-lfoo")

though it could now arguably take a list as an argument to permit
complete one-liner replacements; one could still add a single flag and
the interface would be more functional:

   (Project.config "libflags"
     (cons "-lfoo" (Project.get-config "libflags")))
   => ("-lm" "-lfoo")
   (Project.config "libflags" ("-lbar" "-qux"))
   => ("-lbar" "-lqux")

But, again, I've retained the old behavior to avoid breaking existing
builds.

This also fixes a small issue where by setting the file path print
length to "full" still resulted in the "short" printing scheme.

* fix: small typo fix in config field error messages

* fix: restore old names for cflag and libflag config fields

I accidentally pluralized these field keys, which broke some existing
tests. This commit fixes that issue by restoring the original names.

* fix: backwards compatibility for configuration fields

Another small fix to ensure we retain backwards compatibility with
existing code after recent configuration handling changes: pkg-config
and load-stack fields should return array values, not lists.

* refactor: move project configuration get/setters into a new module

Moves the project configuration frontend code into its own module to
avoid cyclic deps between Project and Obj and keep the Obj module
clean.

I've also removed some noisy comments about "internal only"
project configuration fields.
@pull pull bot added the ⤵️ pull label Mar 23, 2022
@pull pull bot merged commit 55255d3 into forksnd:master Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant