-
Notifications
You must be signed in to change notification settings - Fork 8
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
Fix VERSION file collision on MacOS #92
Merged
dcbaker
merged 7 commits into
cps-org:main
from
dcbaker:submit/meson-fix-version-file-include
Jul 19, 2024
Merged
Fix VERSION file collision on MacOS #92
dcbaker
merged 7 commits into
cps-org:main
from
dcbaker:submit/meson-fix-version-file-include
Jul 19, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This reverts commit 6a54180.
This reverts commit 90f2d67.
This reverts commit b0599f3.
Meson will implicitly include the directory that a target is being built into. This is often useful, but on occasion it causes problems. In this case the Apple libc looks for a VERSION file, which is then found in the source root.
@ckyang0225, does this work for you? (I really need to get a mac) |
Since this better reflects what's in this file
ckyang0225
approved these changes
Jul 19, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works for me, thanks for the fix! @dcbaker
cyang571@QXMYQYF49K cps-config % ninja -C builddir test
ninja: Entering directory `builddir'
[6/16] Compiling C++ object loader_test.p/tests_loader.cpp.o
In file included from ../tests/loader.cpp:7:
/opt/homebrew/Cellar/googletest/1.14.0/include/gtest/gtest.h:1379:11: warning: comparison of integers of different signs: 'const unsigned long' and 'const int' [-Wsign-compare]
if (lhs == rhs) {
~~~ ^ ~~~
/opt/homebrew/Cellar/googletest/1.14.0/include/gtest/gtest.h:1398:12: note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<unsigned long, int>' requested here
return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
^
../tests/loader.cpp:239:13: note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<unsigned long, int, nullptr>' requested here
ASSERT_EQ(package->components.size(), 7) << "should have found 7 different components";
^
/opt/homebrew/Cellar/googletest/1.14.0/include/gtest/gtest.h:1898:31: note: expanded from macro 'ASSERT_EQ'
#define ASSERT_EQ(val1, val2) GTEST_ASSERT_EQ(val1, val2)
^
/opt/homebrew/Cellar/googletest/1.14.0/include/gtest/gtest.h:1882:54: note: expanded from macro 'GTEST_ASSERT_EQ'
ASSERT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
^
1 warning generated.
[15/16] Running all tests.
1/5 loader OK 0.19s
2/5 version OK 0.34s
3/5 utils OK 0.49s
4/5 pkg-config compatibility OK 0.70s 9 subtests passed
5/5 cps integration tests OK 0.71s 20 subtests passed
Ok: 5
Expected Fail: 0
Fail: 0
Unexpected Pass: 0
Skipped: 0
Timeout: 0
dcbaker
force-pushed
the
submit/meson-fix-version-file-include
branch
from
July 19, 2024 16:41
9a27ef2
to
8bbd2a4
Compare
Since we've had at least one regression already that would have been caught by CI, we should have at least some testing on MacOS
dcbaker
force-pushed
the
submit/meson-fix-version-file-include
branch
from
July 19, 2024 16:42
8bbd2a4
to
fc45509
Compare
Since this regressed macOS, I've added a small macOS CI to this PR. |
ckyang0225
approved these changes
Jul 19, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Meson implicitly includes the source and build directory for a target. In the case cps-config and some of the tests, that's the root build directory. The stdlib provided by Apple looks for a file called VERSION. When these two things are combined, the build fails. We don't actually need this behavior from Meson, so we can disable it and leave the name of the file as VERSION.