-
Notifications
You must be signed in to change notification settings - Fork 79
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!: resolve issue with relative paths during linking #284
Conversation
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.
LGTM.
Searching through usages on library_dirs
: https://github.com/search?type=code&q=library_dirs+path%253A*.gyp. It seems to me there are relative paths in library_dirs
in the wild that will be break by this change. I think this PR should be released as a breaking change.
Would you mind updating the list in the document https://github.com/nodejs/gyp-next/blob/main/docs/InputFormatReference.md#pathname-relativization as well?
Thank you! |
Seems like we don't have tests on this, but it will be great if you can update these generators as well to keep them in align. |
hi~@legendecas; I'm not very familiar with the project and don't know how to test with cmake/nanja/msvc. Could you please advise on how to make modifications? |
hi~ any updates here |
Generators can be tested with option Setting up the integration test in #285. |
@Dw9 would you mind rebasing this on top of the main branch and update the integration tests? Thank you! From what's been captured in the integration test, updating make is sufficient, as both ninja and cmake handle the library_dirs correctly.
|
Tested locally. All good.Thank you for your work! @legendecas |
CI build failed in Python tests 😅 |
@legendecas Perhaps gyp-next/test/integration_test.py Line 26 in 356f09c
|
Would you mind updating the integration test? like
|
Thank you for your guidance and patience. @legendecas |
gyp-next git:(main) pytest -vv
======================================================================== test session starts =========================================================================
platform darwin -- Python 3.12.4, pytest-7.4.4, pluggy-1.0.0 -- /opt/anaconda3/bin/python
cachedir: .pytest_cache
rootdir: /Users/weishao/WorkSpace/node-gyp/gyp-next
plugins: anyio-4.8.0, hydra-core-1.3.2
collected 36 items
pylib/gyp/MSVSSettings_test.py::TestSequenceFunctions::testConvertToMSBuildSettings_actual <- ../gyp/pylib/gyp/MSVSSettings_test.py PASSED [ 2%]
pylib/gyp/MSVSSettings_test.py::TestSequenceFunctions::testConvertToMSBuildSettings_empty <- ../gyp/pylib/gyp/MSVSSettings_test.py PASSED [ 5%]
pylib/gyp/MSVSSettings_test.py::TestSequenceFunctions::testConvertToMSBuildSettings_full_synthetic <- ../gyp/pylib/gyp/MSVSSettings_test.py PASSED [ 8%]
pylib/gyp/MSVSSettings_test.py::TestSequenceFunctions::testConvertToMSBuildSettings_minimal <- ../gyp/pylib/gyp/MSVSSettings_test.py PASSED [ 11%]
pylib/gyp/MSVSSettings_test.py::TestSequenceFunctions::testConvertToMSBuildSettings_warnings <- ../gyp/pylib/gyp/MSVSSettings_test.py PASSED [ 13%]
pylib/gyp/MSVSSettings_test.py::TestSequenceFunctions::testValidateMSBuildSettings_settings <- ../gyp/pylib/gyp/MSVSSettings_test.py PASSED [ 16%]
pylib/gyp/MSVSSettings_test.py::TestSequenceFunctions::testValidateMSVSSettings_settings <- ../gyp/pylib/gyp/MSVSSettings_test.py PASSED [ 19%]
pylib/gyp/MSVSSettings_test.py::TestSequenceFunctions::testValidateMSVSSettings_tool_names <- ../gyp/pylib/gyp/MSVSSettings_test.py PASSED [ 22%]
pylib/gyp/common_test.py::TestTopologicallySorted::test_Cycle <- ../gyp/pylib/gyp/common_test.py PASSED [ 25%]
pylib/gyp/common_test.py::TestTopologicallySorted::test_Valid <- ../gyp/pylib/gyp/common_test.py PASSED [ 27%]
pylib/gyp/common_test.py::TestGetFlavor::test_GetCrossCompilerPredefines <- ../gyp/pylib/gyp/common_test.py PASSED [ 30%]
pylib/gyp/common_test.py::TestGetFlavor::test_param <- ../gyp/pylib/gyp/common_test.py PASSED [ 33%]
pylib/gyp/common_test.py::TestGetFlavor::test_platform_default <- ../gyp/pylib/gyp/common_test.py PASSED [ 36%]
pylib/gyp/easy_xml_test.py::TestSequenceFunctions::test_EasyXml_complex <- ../gyp/pylib/gyp/easy_xml_test.py PASSED [ 38%]
pylib/gyp/easy_xml_test.py::TestSequenceFunctions::test_EasyXml_escaping <- ../gyp/pylib/gyp/easy_xml_test.py PASSED [ 41%]
pylib/gyp/easy_xml_test.py::TestSequenceFunctions::test_EasyXml_pretty <- ../gyp/pylib/gyp/easy_xml_test.py PASSED [ 44%]
pylib/gyp/easy_xml_test.py::TestSequenceFunctions::test_EasyXml_simple <- ../gyp/pylib/gyp/easy_xml_test.py PASSED [ 47%]
pylib/gyp/easy_xml_test.py::TestSequenceFunctions::test_EasyXml_simple_with_attributes <- ../gyp/pylib/gyp/easy_xml_test.py PASSED [ 50%]
pylib/gyp/input_test.py::TestFindCycles::test_big_cycle <- ../gyp/pylib/gyp/input_test.py PASSED [ 52%]
pylib/gyp/input_test.py::TestFindCycles::test_cycle_self_reference <- ../gyp/pylib/gyp/input_test.py PASSED [ 55%]
pylib/gyp/input_test.py::TestFindCycles::test_cycle_two_nodes <- ../gyp/pylib/gyp/input_test.py PASSED [ 58%]
pylib/gyp/input_test.py::TestFindCycles::test_no_cycle_dag <- ../gyp/pylib/gyp/input_test.py PASSED [ 61%]
pylib/gyp/input_test.py::TestFindCycles::test_no_cycle_empty_graph <- ../gyp/pylib/gyp/input_test.py PASSED [ 63%]
pylib/gyp/input_test.py::TestFindCycles::test_no_cycle_line <- ../gyp/pylib/gyp/input_test.py PASSED [ 66%]
pylib/gyp/input_test.py::TestFindCycles::test_two_cycles <- ../gyp/pylib/gyp/input_test.py PASSED [ 69%]
pylib/gyp/xcode_emulation_test.py::TestXcodeSettings::test_GetCflags <- ../gyp/pylib/gyp/xcode_emulation_test.py PASSED [ 72%]
pylib/gyp/xcode_emulation_test.py::TestXcodeSettings::test_GetLdflags <- ../gyp/pylib/gyp/xcode_emulation_test.py PASSED [ 75%]
pylib/gyp/generator/msvs_test.py::TestSequenceFunctions::test_GetLibraries <- ../gyp/pylib/gyp/generator/msvs_test.py PASSED [ 77%]
pylib/gyp/generator/ninja_test.py::TestPrefixesAndSuffixes::test_BinaryNamesLinux <- ../gyp/pylib/gyp/generator/ninja_test.py PASSED [ 80%]
pylib/gyp/generator/ninja_test.py::TestPrefixesAndSuffixes::test_BinaryNamesWindows <- ../gyp/pylib/gyp/generator/ninja_test.py PASSED [ 83%]
pylib/gyp/generator/ninja_test.py::TestPrefixesAndSuffixes::test_GenerateCompileDBWithNinja <- ../gyp/pylib/gyp/generator/ninja_test.py PASSED [ 86%]
pylib/gyp/generator/xcode_test.py::TestEscapeXcodeDefine::test_Escaping <- ../gyp/pylib/gyp/generator/xcode_test.py PASSED [ 88%]
pylib/gyp/generator/xcode_test.py::TestEscapeXcodeDefine::test_InheritedRemainsUnescaped <- ../gyp/pylib/gyp/generator/xcode_test.py PASSED [ 91%]
test/integration_test.py::TestGyp::test_cmake PASSED [ 94%]
test/integration_test.py::TestGyp::test_make PASSED [ 97%]
test/integration_test.py::TestGyp::test_ninja PASSED [100%]
========================================================================= 36 passed in 0.99s ========================================================================= |
ci is green now.😄 |
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.
Thanks!
nodejs/node-gyp#3128