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

Update CPS spec support to 0.12 #104

Merged
merged 6 commits into from
Sep 25, 2024
Merged

Conversation

dcbaker
Copy link
Collaborator

@dcbaker dcbaker commented Sep 16, 2024

This updates the support of cps-config to CPS 0.12. The only change that currently affects cps-config is the changes to the "definitions" field. This includes a fix for a bug where cps-config would look for "defines" instead of "definitions"

Currently based on #95

Fixes: #103

@dcbaker dcbaker force-pushed the submit/update-to-0.12 branch from a8e2f00 to 6312382 Compare September 16, 2024 19:18
@dcbaker dcbaker marked this pull request as draft September 16, 2024 19:26
@dcbaker
Copy link
Collaborator Author

dcbaker commented Sep 16, 2024

This works, but I don't like some of it.

@dcbaker dcbaker force-pushed the submit/update-to-0.12 branch 2 times, most recently from 3e58837 to d9ae69c Compare September 16, 2024 21:20
@dcbaker dcbaker linked an issue Sep 16, 2024 that may be closed by this pull request
@dcbaker dcbaker marked this pull request as ready for review September 16, 2024 21:51
@dcbaker dcbaker force-pushed the submit/update-to-0.12 branch 2 times, most recently from 209d12d to 0af539a Compare September 16, 2024 22:58
Copy link
Contributor

@tylerjw tylerjw left a comment

Choose a reason for hiding this comment

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

I built and tested this locally. I'm sorry for the dumb question but is there an easy way for me to see the changes to the cps spec per-version? If I want to see the difference between the 0.10 version and 0.12 how would I do that?

src/cps/env.cpp Outdated
Comment on lines 1 to 2
// Copyright © 2023-2024 Dylan Baker
// Copyright © 2024 Tyler Weaver
// Copyright © 2024 Dylan Baker
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you have an editor tool doing this, your name is in the first line.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, my editor is doing that and I missed undoing one of them apparently... Sigh

Copy link
Contributor

Choose a reason for hiding this comment

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

np, figured it was some tool doing this

@dcbaker
Copy link
Collaborator Author

dcbaker commented Sep 24, 2024

I built and tested this locally. I'm sorry for the dumb question but is there an easy way for me to see the changes to the cps spec per-version? If I want to see the difference between the 0.10 version and 0.12 how would I do that?

Not really, I just look through the git history commit by commit between the two versions and made a list in the linked issue. I asked on slack (and I think we agreed?) to start adding a git tag each time the spec version is bumped to to help with this.

@tylerjw
Copy link
Contributor

tylerjw commented Sep 24, 2024

You don't happen to have the commit hash you started with for 0.10 handy do you?

@dcbaker dcbaker force-pushed the submit/update-to-0.12 branch from 0af539a to f71b9fc Compare September 24, 2024 23:16
@dcbaker
Copy link
Collaborator Author

dcbaker commented Sep 24, 2024

Pretty sure it was 97ac8d77f878768cb6ee15d3f9b848e8f1149b55

@tylerjw
Copy link
Contributor

tylerjw commented Sep 24, 2024

This seems like an important change to land. Is there anything specific I should help with next? I looked through the pc file parser mr, I think I'm a bit confused about the need for this tool to parse pc files. I have been out of the loop for the last few months though so I probably just missed something.

I'm not sure what happened here, whether this changed at some point or
it was just always implemented wrong.
This provides better self documentation
This updates CPS files and tests, since we now support the 0.12 spec and
not the 0.10/0.11 spec
Since 0.12 dropped support for undefines, we can remove the code to
support it as well.
This handles the case of "*", including the proper override for when a
language is specifically defined with its own values.

Fixes: cps-org#69
@dcbaker dcbaker force-pushed the submit/update-to-0.12 branch from f71b9fc to 5caeb0f Compare September 25, 2024 16:27
@dcbaker
Copy link
Collaborator Author

dcbaker commented Sep 25, 2024

This seems like an important change to land. Is there anything specific I should help with next? I looked through the pc file parser mr, I think I'm a bit confused about the need for this tool to parse pc files. I have been out of the loop for the last few months though so I probably just missed something.

The only thing I'm working on at the moment is trying to get the <name-like> search paths implemented. So anything else you see is fair game.

The goal of the .pc file parsing is so that cps-config can be used as s drop in replacement for pkg-config, particularly in autotools and older versions of build systems (someone who has a hard requirement to use a very old version of CMake or Meson, for example), to that end being able to fall back to finding a .pc file instead of a .cps file for projects that only provide .pc files is pretty important.

@dcbaker dcbaker merged commit 2f2b172 into cps-org:main Sep 25, 2024
8 checks passed
@dcbaker dcbaker deleted the submit/update-to-0.12 branch September 25, 2024 16:30
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.

Update to CPS 0.12 Include language wildcard
2 participants