Ruby: align type-tracking visibility with JS/Python#13615
Draft
asgerf wants to merge 6 commits intogithub:mainfrom
Draft
Ruby: align type-tracking visibility with JS/Python#13615asgerf wants to merge 6 commits intogithub:mainfrom
asgerf wants to merge 6 commits intogithub:mainfrom
Conversation
22bd0d6 to
f3ee9e2
Compare
This file contains hidden or 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
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.


This started as some prep work to share the recent API graph overhaul with Python, but some differences in type-tracking are starting to cause a lot of friction.
So in this PR I'm aligning Ruby with JS/Python in terms of where type-tracking files are stored and how they are exposed to the end-user.
The
TypeTrackerandTypeBackTrackerclasses are now exposed asDataFlow::TypeTrackerandDataFlow::TypeBackTracker, as they have always been in JS and Python. The qldoc for theTypeTrackerclass contains example code that refers to it asDataFlow::TypeTrackerand this code never worked in Ruby. Now the same example code works across languages.Why not align in the opposite direction? Personally I find that this style makes important features more discoverable, and it's easier to write self-contained snippets of code for others when don't have to remind them to also import a certain file, and when you're typing you don't have to jump to the top of the file to add a new import (or check if it's already imported with an alias). Also there's just more code that would break if we align the other way.
Additionally, all files have moved out of the
codeql.ruby.typetrackingfolder into eithercodeql.ruby.datafloworcodeql.ruby.dataflow.internal. A deprecated forwarder library has been left behind.