Uh oh!
There was an error while loading. Please reload this page.
Fix relative paths, again - #418
Conversation
…eader matching (cppcheck-opensource#362)" (cppcheck-opensource#415)" This reverts commit 9ce981c.
Uh oh!
There was an error while loading. Please reload this page.
Tal500
commented
Feb 25, 2025
Note: See the compilation test for both UNICODE and non-UNICODE mode at compiler explorer (my best guess) |
danmar
commented
Mar 18, 2025
ok I try it out here: cppcheck-opensource/cppcheck#7381 |
danmar
commented
Mar 18, 2025
Well this does not work neither: https://github.com/danmar/cppcheck/actions/runs/13923783226/job/38962964585?pr=7381 CI output: |
danmar
commented
Mar 18, 2025
@Tal500 I am sorry for slow reply.. hope you can fix it anyway. |
Tal500
commented
Mar 20, 2025
There must be something wrong with how that you run this test suite. It comlains: But the thing that I just fixed in this PR is to have only a single, "static", function definition of |
On second glance, the problem seems to be very stupid. Microsoft MSVC complains about redefinition of a function even when one of them is defined to be with "static" visibility, when you do static linkage. EDIT: namespacing seems like a more sane solution EDIT2: hhhhh seems you did exactly what I said already in the code: So I'm joining the party for now. I suggest using Please try delivering these changes again. |
danmar
commented
Apr 5, 2025
@Tal500 I tried this quickly. There is a testcase in cppcheck that fails: https://github.com/danmar/cppcheck/actions/runs/14283167360/job/40035087732?pr=7381 The full CI message: So it seems there is a unwanted message: |
danmar
commented
Apr 5, 2025
The selfchecks in the CI also fail but I am not sure if that is caused by these changes right now. |
danmar
commented
Apr 5, 2025
The test |
Tal500
commented
Apr 5, 2025
I claim that the "valid" value there is WRONG and the "actual" string value is CORRECT. |
Tal500
commented
Apr 5, 2025
It's a matter of taste. I do not mind to have a double coverage, one that checks within the library and one that checks the library within the usage. |
yeah I am not against that we have tests in cppcheck but it seems to me that we could test this directly in simplecpp also.. |
Tal500
commented
Apr 6, 2025
The test cases there seems to be redundant, you can then omit them at all. |
danmar
commented
Apr 7, 2025
I am not sure am I missing something? There is a file So we should find that shouldn't we? |
danmar
commented
Apr 7, 2025
This manual test is the same isn't it? gcc does not complain about a missing header3.h file. |
Tal500
commented
Apr 7, 2025
I didn't notice that the file is actually being created, so the behavior you claimed is correct. > ./simplecpp -Isystem test.c
(no output)After debugging, I uploaded a fix now. The error was that the wchar to char conversion of the current directory was failing for some reason in windows 2019 release (a very weird bug, really don't know the true cause). static std::string currentDirectoryOSCalc() {
const std::size_t size = 4096;
char currentPath[size];
#ifndef _WIN32
if (getcwd(currentPath, size) != nullptr)
#elseif (_getcwd(currentPath, size) != nullptr)
#endifreturnstd::string(currentPath);
return"";
}For debugging and verifying, I tried to create a pull request in my fork of cppcheck, to reproduce your checks. The checks looks very good now - Tal500/cppcheck#1 Sadly, I was unable to reproduce this weird behavior in simplecpp automated CI workflow, so while the logical test code is already covered by the python tests, the CI windows setup that reproduced it is not. Please try to integrate it again. |
danmar
commented
Apr 7, 2025
Thanks I will try it out again |
danmar
commented
Apr 7, 2025
CI is running now: |
Tal500
commented
May 8, 2025
Hi! Any update? |
danmar
commented
May 9, 2025
hmm.. there was additional selfcheck warnings in tinyxml and simplecpp. however I guess that might mean the files are analyzed more properly and it indicates that these changes are good.. |
danmar
commented
May 9, 2025
@Tal500 could you please solve the issues here then I will merge this and try to upstream this again? |
danmar
commented
May 9, 2025
I tried to solve the merge conflict but I might have messed up :-( |
Tal500
commented
May 9, 2025
Seems just like we just need to properly set up Python again in the CI workflow. |
Tal500
commented
May 9, 2025
Fixed now |
Tal500
commented
May 9, 2025
Thank you! |
Undo #415 , and hopefully finally fix the Windows string conversion error.
The windows string conversion part is based on https://gist.github.com/RyanJeong/04a4b92879ab10edfd9656d0aa4f3b77
Fixes#402