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

Revert valueflow split #6991

Merged
merged 19 commits into from
Nov 22, 2024
Merged

Revert valueflow split #6991

merged 19 commits into from
Nov 22, 2024

Conversation

pfultz2
Copy link
Contributor

@pfultz2 pfultz2 commented Nov 5, 2024

Revert most of the moving passes out of valueflow.cpp. Splitting up valueflow should be organized differently.

@pfultz2
Copy link
Contributor Author

pfultz2 commented Nov 8, 2024

The error in CI is unrelated to this PR, and is a failure with getting qt packages on windows:

INFO    : aqtinstall(aqt) v3.1.18 on Python 3.11.9 [CPython MSC v.1938 64 bit (AMD64)]
WARNING : Specified Qt version "6.7.3" did not exist when this version of aqtinstall was released. This may not install properly, but we will try our best.
WARNING : Specified target combination "windows desktop win64_msvc2022_64" did not exist when this version of aqtinstall was released. This may not install properly, but we will try our best.
ERROR   : The packages ['qt_base', 'qtcharts'] were not found while parsing XML of package information!
==============================Suggested follow-up:==============================
* Please use 'aqt list-qt windows desktop --arch 6.7.3' to show architectures available.
* Please use 'aqt list-qt windows desktop --modules 6.7.3 <arch>' to show modules available.

@pfultz2
Copy link
Contributor Author

pfultz2 commented Nov 9, 2024

This same failure is on the main branch.

@firewave
Copy link
Collaborator

firewave commented Nov 16, 2024

Just looking at the changes files and not the changes it self.

Please revert the *.ts changes.

It also seems you missed to merge back vf_number.cpp and vf_enumvalue.cpp.

@firewave
Copy link
Collaborator

I also think the infer.cpp changes are fine and should stay.

@firewave
Copy link
Collaborator

vf_debug.cpp also looks like it should be merged back.

@danmar
Copy link
Owner

danmar commented Nov 17, 2024

Please revert the *.ts changes.

imho the ts files should not be changed behind our backs.

I have always updated the ts files during the release. How do I update the ts files nowadays when qmake support is removed? It would be good to document that step in the createrelease document which I follow when I make the releases.

@danmar
Copy link
Owner

danmar commented Nov 17, 2024

Please revert the *.ts changes.

I created https://trac.cppcheck.net/ticket/13322

@firewave
Copy link
Collaborator

Please revert the *.ts changes.

imho the ts files should not be changed behind our backs.

I have always updated the ts files during the release. How do I update the ts files nowadays when qmake support is removed? It would be good to document that step in the createrelease document which I follow when I make the releases.

That is done implicitly. Only updating them on release never made sense because that means that they will always be out-of-date during development and might render translated versions unusable.

@danmar
Copy link
Owner

danmar commented Nov 18, 2024

That is done implicitly. Only updating them on release never made sense because that means that they will always be out-of-date during development and might render translated versions unusable.

ok well if you can make it work properly so that they are only updated when I change a related file I am not against it. Paul did not change any related files here in this PR.

@pfultz2
Copy link
Contributor Author

pfultz2 commented Nov 18, 2024

Please revert the *.ts changes.

I am not sure what you are talking about. I reverted the actual commits which should revert everything.

@pfultz2
Copy link
Contributor Author

pfultz2 commented Nov 18, 2024

It also seems you missed to merge back vf_number.cpp and vf_enumvalue.cpp.

I'll address that in a leter PR.

I also think the infer.cpp changes are fine and should stay.

Let me put those changes back in this PR.

vf_debug.cpp also looks like it should be merged back.

I dont think the pass is significant enough to have in a seperate file.

@firewave
Copy link
Collaborator

It also seems you missed to merge back vf_number.cpp and vf_enumvalue.cpp.

I'll address that in a leter PR.

I would prefer if we could revert it all in a single PR.

vf_debug.cpp also looks like it should be merged back.

I dont think the pass is significant enough to have in a seperate file.

That's what I said.

@pfultz2
Copy link
Contributor Author

pfultz2 commented Nov 20, 2024

I would prefer if we could revert it all in a single PR.

I would prefer it be merged in quicker so we can avoid major merge conflicts if there is another PR making tweaks to ValueFlow.

@pfultz2
Copy link
Contributor Author

pfultz2 commented Nov 20, 2024

vf_debug.cpp also looks like it should be merged back.

I dont think the pass is significant enough to have in a seperate file.

That's what I said.

I see what you are saying now, I'll address that in a follow-up PR.

@pfultz2
Copy link
Contributor Author

pfultz2 commented Nov 20, 2024

I also think the infer.cpp changes are fine and should stay.

I reverted those now.

@firewave
Copy link
Collaborator

I would prefer it be merged in quicker so we can avoid major merge conflicts if there is another PR making tweaks to ValueFlow.

Yeah - I refrained from publishing ones affecting those. Will take a look later today and will merge if it looks okay. I can also do the remaining reverting immediately after.

@firewave
Copy link
Collaborator

I was too tired last night - will take a look when I get back in later. Sorry about that.

@@ -4571,6 +6163,55 @@ static void valueFlowSmartPointer(TokenList &tokenlist, ErrorLogger & errorLogge
}
}

static Library::Container::Yield findIteratorYield(Token* tok, const Token** ftok, const Settings& settings)
Copy link
Collaborator

@firewave firewave Nov 21, 2024

Choose a reason for hiding this comment

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

VFA_CPP(valueFlowContainerSize(tokenlist, symboldatabase, errorLogger, settings, skippedFunctions)),
VFA(valueFlowSafeFunctions(tokenlist, symboldatabase, errorLogger, settings)),
});

runner.run_once({
VFA(valueFlowDynamicBufferSize(tokenlist, symboldatabase, errorLogger, settings)),
VFA(analyzeDebug(tokenlist, errorLogger, settings)), // TODO: add option to print it after each step/iteration
VFA(valueFlowDebug(tokenlist, errorLogger, settings)),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You mean the comment?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes. Nothing to be addressed here. Just to note the differences I spotted during the review.

Copy link
Collaborator

@firewave firewave left a comment

Choose a reason for hiding this comment

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

The *.ts file changes still need to be dropped.

Otherwise it looks fine. Fortunately not many changes (only two commits - unless I missed something) were done to the split out files.

@firewave
Copy link
Collaborator

Just drop the .ts changes and we can merge it. The rest can be addressed afterwards.

Copy link
Collaborator

@firewave firewave left a comment

Choose a reason for hiding this comment

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

I pushed a commit dropping the .ts changes.

@firewave firewave merged commit 9989e18 into danmar:main Nov 22, 2024
60 checks passed
@pfultz2 pfultz2 deleted the revert-valueflow-split branch November 22, 2024 14:35
chrchr-github pushed a commit that referenced this pull request Nov 23, 2024
restores the changes lost in #6991
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.

3 participants