Skip to content

Fix GitHub History + Upgrade to 2.22.2 #20195

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

Closed
wants to merge 1,379 commits into from
Closed

Conversation

dilanbhalla
Copy link
Contributor

Rebased jb1/main (which contains 2.22.2 merge) onto the merge commit for PR #256.

aibaars and others added 30 commits August 8, 2025 10:54
When running `gh api /repos/...` in the Git Bash on Windows, it leads to
a 404. The reason is the automatic path conversion from "Unix-y" paths
on the command-line to proper Windows paths, as described in detail
https://www.msys2.org/docs/filesystem-paths/. Git Bash simply has no
chance to understnad that `/repos/...` is not referring to an absolute
path on the local filesystem.

Let's just skip the leading slash. This is as valid an invocation, and
sidesteps that path conversion on Windows.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Bumps the extractor-dependencies group in /go/extractor with 1 update: [golang.org/x/mod](https://github.com/golang/mod).


Updates `golang.org/x/mod` from 0.25.0 to 0.26.0
- [Commits](golang/mod@v0.25.0...v0.26.0)

---
updated-dependencies:
- dependency-name: golang.org/x/mod
  dependency-version: 0.26.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: extractor-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Before
```
Evaluated relational algebra for predicate TypeInference::getRangeType/1#b4219ae9@c15c3f0b with tuple counts:
               1   ~0%    {1} r1 = CONSTANT(unique string)[".."]
             692   ~0%    {1}    | JOIN WITH `RangeExpr::Generated::RangeExpr.getOperatorName/0#dispred#7c90645c_10#join_rhs` ON FIRST 1 OUTPUT Rhs.1

             453   ~0%    {1} r2 = JOIN r1 WITH `RangeExpr::Generated::RangeExpr.getStart/0#dispred#914c8207` ON FIRST 1 OUTPUT Lhs.0

             266   ~1%    {1} r3 = JOIN r2 WITH `RangeExpr::Generated::RangeExpr.getEnd/0#dispred#6c692cfa` ON FIRST 1 OUTPUT Lhs.0
        10684422   ~0%    {3}    | JOIN WITH cached_Synth::Synth::TStruct#c298e97c CARTESIAN PRODUCT OUTPUT Rhs.1, _, Lhs.0
        10684422   ~0%    {3}    | REWRITE WITH Out.1 := "core::ops::range::Range"
             266   ~0%    {2}    | JOIN WITH `Addressable::Addressable.getCanonicalPath/0#dispred#6044348f#bb` ON FIRST 2 OUTPUT Lhs.2, Lhs.0

             363   ~3%    {1} r4 = JOIN r1 WITH `RangeExpr::Generated::RangeExpr.getEnd/0#dispred#6c692cfa` ON FIRST 1 OUTPUT Lhs.0
              97   ~2%    {1}    | AND NOT `RangeExpr::Generated::RangeExpr.getStart/0#dispred#914c8207_0#antijoin_rhs`(FIRST 1)
         3896199   ~0%    {3}    | JOIN WITH cached_Synth::Synth::TStruct#c298e97c CARTESIAN PRODUCT OUTPUT Rhs.1, _, Lhs.0
         3896199   ~0%    {3}    | REWRITE WITH Out.1 := "core::ops::range::RangeTo"
              97   ~1%    {2}    | JOIN WITH `Addressable::Addressable.getCanonicalPath/0#dispred#6044348f#bb` ON FIRST 2 OUTPUT Lhs.2, Lhs.0

             187   ~0%    {1} r5 = r2 AND NOT `RangeExpr::Generated::RangeExpr.getEnd/0#dispred#6c692cfa_0#antijoin_rhs`(FIRST 1)
         7511229   ~2%    {3}    | JOIN WITH cached_Synth::Synth::TStruct#c298e97c CARTESIAN PRODUCT OUTPUT Rhs.1, _, Lhs.0
         7511229   ~0%    {3}    | REWRITE WITH Out.1 := "core::ops::range::RangeFrom"
             187   ~1%    {2}    | JOIN WITH `Addressable::Addressable.getCanonicalPath/0#dispred#6044348f#bb` ON FIRST 2 OUTPUT Lhs.2, Lhs.0

               1   ~0%    {1} r6 = CONSTANT(unique string)["..="]
             138   ~0%    {1}    | JOIN WITH `RangeExpr::Generated::RangeExpr.getOperatorName/0#dispred#7c90645c_10#join_rhs` ON FIRST 1 OUTPUT Rhs.1

             131   ~0%    {1} r7 = JOIN r6 WITH `RangeExpr::Generated::RangeExpr.getStart/0#dispred#914c8207` ON FIRST 1 OUTPUT Lhs.0
             131   ~0%    {1}    | JOIN WITH `RangeExpr::Generated::RangeExpr.getEnd/0#dispred#6c692cfa` ON FIRST 1 OUTPUT Lhs.0
         5261877   ~0%    {3}    | JOIN WITH cached_Synth::Synth::TStruct#c298e97c CARTESIAN PRODUCT OUTPUT Rhs.1, _, Lhs.0
         5261877   ~0%    {3}    | REWRITE WITH Out.1 := "core::ops::range::RangeInclusive"
             131   ~3%    {2}    | JOIN WITH `Addressable::Addressable.getCanonicalPath/0#dispred#6044348f#bb` ON FIRST 2 OUTPUT Lhs.2, Lhs.0

             138   ~0%    {1} r8 = JOIN r6 WITH `RangeExpr::Generated::RangeExpr.getEnd/0#dispred#6c692cfa` ON FIRST 1 OUTPUT Lhs.0
               7   ~0%    {1}    | AND NOT `RangeExpr::Generated::RangeExpr.getStart/0#dispred#914c8207_0#antijoin_rhs`(FIRST 1)
          281169   ~0%    {3}    | JOIN WITH cached_Synth::Synth::TStruct#c298e97c CARTESIAN PRODUCT OUTPUT Rhs.1, _, Lhs.0
          281169   ~2%    {3}    | REWRITE WITH Out.1 := "core::ops::range::RangeToInclusive"
               7   ~0%    {2}    | JOIN WITH `Addressable::Addressable.getCanonicalPath/0#dispred#6044348f#bb` ON FIRST 2 OUTPUT Lhs.2, Lhs.0

             688   ~0%    {2} r9 = r3 UNION r4 UNION r5 UNION r7 UNION r8
                          return r9
```

After
```
Evaluated relational algebra for predicate TypeInference::getRangeType/1#b4219ae9@7d06d41t with tuple counts:
          1   ~0%    {2} r1 = SCAN Stdlib::RangeToStruct#236b6b84 OUTPUT _, In.0
          1   ~0%    {2}    | REWRITE WITH Out.0 := ".."
        692   ~0%    {2}    | JOIN WITH `RangeExpr::Generated::RangeExpr.getOperatorName/0#dispred#7c90645c_10#join_rhs` ON FIRST 1 OUTPUT Rhs.1, Lhs.1
        363   ~0%    {2}    | JOIN WITH `RangeExpr::Generated::RangeExpr.getEnd/0#dispred#6c692cfa` ON FIRST 1 OUTPUT Lhs.0, Lhs.1
         97   ~0%    {2}    | AND NOT `RangeExpr::Generated::RangeExpr.getStart/0#dispred#914c8207_0#antijoin_rhs`(FIRST 1)

          1   ~0%    {2} r2 = SCAN Stdlib::RangeFromStruct#8edcefe7 OUTPUT _, In.0
          1   ~0%    {2}    | REWRITE WITH Out.0 := ".."
        692   ~0%    {2}    | JOIN WITH `RangeExpr::Generated::RangeExpr.getOperatorName/0#dispred#7c90645c_10#join_rhs` ON FIRST 1 OUTPUT Rhs.1, Lhs.1
        453   ~0%    {2}    | JOIN WITH `RangeExpr::Generated::RangeExpr.getStart/0#dispred#914c8207` ON FIRST 1 OUTPUT Lhs.0, Lhs.1
        187   ~0%    {2}    | AND NOT `RangeExpr::Generated::RangeExpr.getEnd/0#dispred#6c692cfa_0#antijoin_rhs`(FIRST 1)

          1   ~0%    {2} r3 = SCAN Stdlib::RangeToInclusiveStruct#fe43a433 OUTPUT _, In.0
          1   ~0%    {2}    | REWRITE WITH Out.0 := "..="
        138   ~0%    {2}    | JOIN WITH `RangeExpr::Generated::RangeExpr.getOperatorName/0#dispred#7c90645c_10#join_rhs` ON FIRST 1 OUTPUT Rhs.1, Lhs.1
        138   ~0%    {2}    | JOIN WITH `RangeExpr::Generated::RangeExpr.getEnd/0#dispred#6c692cfa` ON FIRST 1 OUTPUT Lhs.0, Lhs.1
          7   ~0%    {2}    | AND NOT `RangeExpr::Generated::RangeExpr.getStart/0#dispred#914c8207_0#antijoin_rhs`(FIRST 1)

          1   ~0%    {2} r4 = SCAN Stdlib::RangeStruct#0fabc810 OUTPUT _, In.0
          1   ~0%    {2}    | REWRITE WITH Out.0 := ".."
        692   ~3%    {2}    | JOIN WITH `RangeExpr::Generated::RangeExpr.getOperatorName/0#dispred#7c90645c_10#join_rhs` ON FIRST 1 OUTPUT Rhs.1, Lhs.1
        453   ~4%    {2}    | JOIN WITH `RangeExpr::Generated::RangeExpr.getStart/0#dispred#914c8207` ON FIRST 1 OUTPUT Lhs.0, Lhs.1
        266   ~2%    {2}    | JOIN WITH `RangeExpr::Generated::RangeExpr.getEnd/0#dispred#6c692cfa` ON FIRST 1 OUTPUT Lhs.0, Lhs.1

          1   ~0%    {2} r5 = SCAN Stdlib::RangeInclusiveStruct#a869750a OUTPUT _, In.0
          1   ~0%    {2}    | REWRITE WITH Out.0 := "..="
        138   ~0%    {2}    | JOIN WITH `RangeExpr::Generated::RangeExpr.getOperatorName/0#dispred#7c90645c_10#join_rhs` ON FIRST 1 OUTPUT Rhs.1, Lhs.1
        131   ~0%    {2}    | JOIN WITH `RangeExpr::Generated::RangeExpr.getStart/0#dispred#914c8207` ON FIRST 1 OUTPUT Lhs.0, Lhs.1
        131   ~0%    {2}    | JOIN WITH `RangeExpr::Generated::RangeExpr.getEnd/0#dispred#6c692cfa` ON FIRST 1 OUTPUT Lhs.0, Lhs.1

        688   ~7%    {2} r6 = r1 UNION r2 UNION r3 UNION r4 UNION r5
                     return r6
```
Co-authored-by: Arthur Baars <aibaars@github.com>
….yml

Co-authored-by: Arthur Baars <aibaars@github.com>
Co-authored-by: Arthur Baars <aibaars@github.com>
nickrolfe and others added 8 commits August 8, 2025 11:11
PS: Fix bug in `CallOperator::getCommand`
…les-2

PS: Global flow through environment variables
…ction

PS: Remove environment variables from `powershell/microsoft/public/sql-injection`
CodeQL for IaC (infrastructure as code) Setup
PS: Add simple type-based sanitizer to SQL injection query
@Copilot Copilot AI review requested due to automatic review settings August 8, 2025 18:19
@dilanbhalla dilanbhalla requested review from a team as code owners August 8, 2025 18:19
@dilanbhalla dilanbhalla closed this Aug 8, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR upgrades the codebase to version 2.22.2 and fixes GitHub History by rebasing jb1/main onto PR #256. The primary change is a database schema upgrade that moves builtin function identification to its own separate table, which improves the organization and querying of builtin functions in the C++ analysis.

  • Database schema upgrade for builtin function identification
  • Introduces separate builtin_functions table for better organization
  • Maintains full compatibility with existing code

Reviewed Changes

Copilot reviewed 77 out of 5204 changed files in this pull request and generated no comments.

File Description
cpp/ql/lib/upgrades/801b2f03360d78c85f51fbad9b75956fa8d58b00/old.dbscheme Old schema file defining the previous database structure
cpp/ql/lib/upgrades/5491582ac8511726e12fae3e2399000f9201cd9a/upgrade.properties Upgrade configuration defining migration from old schema
cpp/ql/lib/upgrades/5491582ac8511726e12fae3e2399000f9201cd9a/semmlecode.cpp.dbscheme New schema file with separated builtin function table

@dilanbhalla
Copy link
Contributor Author

Meant to push to msft fork, apologies please ignore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.