Skip to content

Java: Argument[-1] -> Argument[this] #12556

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

Merged
merged 11 commits into from
Mar 20, 2023

Conversation

michaelnebel
Copy link
Contributor

@michaelnebel michaelnebel commented Mar 16, 2023

In this PR we change the syntax of the input/output DSL of MaD models such that Argument[this] is used to denote the qualifier instead of Argument[-1].
Please note that

  • The is a breaking change and models using Argument[-1] will no longer work.
  • Validation has been introduced to ensure that for Argument[n] then n >= 0 (this also applies to ranges).
  • The discrepancy in the number of models is because some models need to be split into several rows. If a model used a range that included -1 (e.g. Argument[-1..0]) then that model needed to be split.
  • The model generator has been updated such that it produces models using Argument[this] as qualifier.
  • The Java test generator works out of the box for this change.

@lcartey : This is relevant for the field team. All models need to be updated accordingly.

@github-actions
Copy link
Contributor

⚠️ The head of this PR and the base branch were compared for differences in the framework coverage reports. The generated reports are available in the artifacts of this workflow run. The differences will be picked up by the nightly job after the PR gets merged.

Click to show differences in coverage

java

Generated file changes for java

  • Changes to framework-coverage-java.rst:
-    Android,``android.*``,52,479,138,,,3,67,,,
+    Android,``android.*``,52,481,138,,,3,67,,,
-    `Google Guava <https://guava.dev/>`_,``com.google.common.*``,,728,39,,6,,,,,
+    `Google Guava <https://guava.dev/>`_,``com.google.common.*``,,730,39,,6,,,,,
-    Java Standard Library,``java.*``,3,611,141,30,,,9,,,10
+    Java Standard Library,``java.*``,3,612,141,30,,,9,,,10
-    `Spring <https://spring.io/>`_,``org.springframework.*``,29,477,101,,,,19,14,,29
+    `Spring <https://spring.io/>`_,``org.springframework.*``,29,480,101,,,,19,14,,29
-    Totals,,217,8467,1582,133,6,10,113,33,1,88
+    Totals,,217,8475,1582,133,6,10,113,33,1,88
  • Changes to framework-coverage-java.csv:
- android.database,59,,39,,,,,,,,,,,,,,,,,,,,,,,,,,59,,,,,,,,,,,,39,
+ android.database,59,,41,,,,,,,,,,,,,,,,,,,,,,,,,,59,,,,,,,,,,,,41,
- com.google.common.base,4,,85,,,,,,,,,,,,,,,,,,,,3,1,,,,,,,,,,,,,,,,,62,23
+ com.google.common.base,4,,87,,,,,,,,,,,,,,,,,,,,3,1,,,,,,,,,,,,,,,,,63,24
- java.nio,16,,16,,13,,,,,,,,,,,,,,,1,,,,,,,,,,,,,2,,,,,,,,16,
+ java.nio,16,,17,,13,,,,,,,,,,,,,,,1,,,,,,,,,,,,,2,,,,,,,,17,
- org.springframework.http,14,,70,,,,,,,,,,,,,,,14,,,,,,,,,,,,,,,,,,,,,,,60,10
+ org.springframework.http,14,,71,,,,,,,,,,,,,,,14,,,,,,,,,,,,,,,,,,,,,,,61,10
- org.springframework.web.util,,,163,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,138,25
+ org.springframework.web.util,,,165,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,140,25

@github-actions
Copy link
Contributor

⚠️ The head of this PR and the base branch were compared for differences in the framework coverage reports. The generated reports are available in the artifacts of this workflow run. The differences will be picked up by the nightly job after the PR gets merged.

Click to show differences in coverage

java

Generated file changes for java

  • Changes to framework-coverage-java.rst:
-    Android,``android.*``,52,479,138,,,3,67,,,
+    Android,``android.*``,52,481,138,,,3,67,,,
-    `Google Guava <https://guava.dev/>`_,``com.google.common.*``,,728,39,,6,,,,,
+    `Google Guava <https://guava.dev/>`_,``com.google.common.*``,,730,39,,6,,,,,
-    Java Standard Library,``java.*``,3,611,141,30,,,9,,,10
+    Java Standard Library,``java.*``,3,612,141,30,,,9,,,10
-    `Spring <https://spring.io/>`_,``org.springframework.*``,29,477,101,,,,19,14,,29
+    `Spring <https://spring.io/>`_,``org.springframework.*``,29,480,101,,,,19,14,,29
-    Totals,,217,8467,1582,133,6,10,113,33,1,88
+    Totals,,217,8475,1582,133,6,10,113,33,1,88
  • Changes to framework-coverage-java.csv:
- android.database,59,,39,,,,,,,,,,,,,,,,,,,,,,,,,,59,,,,,,,,,,,,39,
+ android.database,59,,41,,,,,,,,,,,,,,,,,,,,,,,,,,59,,,,,,,,,,,,41,
- com.google.common.base,4,,85,,,,,,,,,,,,,,,,,,,,3,1,,,,,,,,,,,,,,,,,62,23
+ com.google.common.base,4,,87,,,,,,,,,,,,,,,,,,,,3,1,,,,,,,,,,,,,,,,,63,24
- java.nio,16,,16,,13,,,,,,,,,,,,,,,1,,,,,,,,,,,,,2,,,,,,,,16,
+ java.nio,16,,17,,13,,,,,,,,,,,,,,,1,,,,,,,,,,,,,2,,,,,,,,17,
- org.springframework.http,14,,70,,,,,,,,,,,,,,,14,,,,,,,,,,,,,,,,,,,,,,,60,10
+ org.springframework.http,14,,71,,,,,,,,,,,,,,,14,,,,,,,,,,,,,,,,,,,,,,,61,10
- org.springframework.web.util,,,163,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,138,25
+ org.springframework.web.util,,,165,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,140,25

@github-actions
Copy link
Contributor

⚠️ The head of this PR and the base branch were compared for differences in the framework coverage reports. The generated reports are available in the artifacts of this workflow run. The differences will be picked up by the nightly job after the PR gets merged.

Click to show differences in coverage

java

Generated file changes for java

  • Changes to framework-coverage-java.rst:
-    Android,``android.*``,52,479,138,,,3,67,,,
+    Android,``android.*``,52,481,138,,,3,67,,,
-    `Google Guava <https://guava.dev/>`_,``com.google.common.*``,,728,39,,6,,,,,
+    `Google Guava <https://guava.dev/>`_,``com.google.common.*``,,730,39,,6,,,,,
-    Java Standard Library,``java.*``,3,611,141,30,,,9,,,10
+    Java Standard Library,``java.*``,3,612,141,30,,,9,,,10
-    `Spring <https://spring.io/>`_,``org.springframework.*``,29,477,101,,,,19,14,,29
+    `Spring <https://spring.io/>`_,``org.springframework.*``,29,480,101,,,,19,14,,29
-    Totals,,217,8467,1582,133,6,10,113,33,1,88
+    Totals,,217,8475,1582,133,6,10,113,33,1,88
  • Changes to framework-coverage-java.csv:
- android.database,59,,39,,,,,,,,,,,,,,,,,,,,,,,,,,59,,,,,,,,,,,,39,
+ android.database,59,,41,,,,,,,,,,,,,,,,,,,,,,,,,,59,,,,,,,,,,,,41,
- com.google.common.base,4,,85,,,,,,,,,,,,,,,,,,,,3,1,,,,,,,,,,,,,,,,,62,23
+ com.google.common.base,4,,87,,,,,,,,,,,,,,,,,,,,3,1,,,,,,,,,,,,,,,,,63,24
- java.nio,16,,16,,13,,,,,,,,,,,,,,,1,,,,,,,,,,,,,2,,,,,,,,16,
+ java.nio,16,,17,,13,,,,,,,,,,,,,,,1,,,,,,,,,,,,,2,,,,,,,,17,
- org.springframework.http,14,,70,,,,,,,,,,,,,,,14,,,,,,,,,,,,,,,,,,,,,,,60,10
+ org.springframework.http,14,,71,,,,,,,,,,,,,,,14,,,,,,,,,,,,,,,,,,,,,,,61,10
- org.springframework.web.util,,,163,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,138,25
+ org.springframework.web.util,,,165,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,140,25

@github-actions
Copy link
Contributor

⚠️ The head of this PR and the base branch were compared for differences in the framework coverage reports. The generated reports are available in the artifacts of this workflow run. The differences will be picked up by the nightly job after the PR gets merged.

Click to show differences in coverage

java

Generated file changes for java

  • Changes to framework-coverage-java.rst:
-    Android,``android.*``,52,479,138,,,3,67,,,
+    Android,``android.*``,52,481,138,,,3,67,,,
-    `Google Guava <https://guava.dev/>`_,``com.google.common.*``,,728,39,,6,,,,,
+    `Google Guava <https://guava.dev/>`_,``com.google.common.*``,,730,39,,6,,,,,
-    Java Standard Library,``java.*``,3,611,141,30,,,9,,,10
+    Java Standard Library,``java.*``,3,612,141,30,,,9,,,10
-    `Spring <https://spring.io/>`_,``org.springframework.*``,29,477,101,,,,19,14,,29
+    `Spring <https://spring.io/>`_,``org.springframework.*``,29,480,101,,,,19,14,,29
-    Totals,,217,8467,1582,133,6,10,113,33,1,88
+    Totals,,217,8475,1582,133,6,10,113,33,1,88
  • Changes to framework-coverage-java.csv:
- android.database,59,,39,,,,,,,,,,,,,,,,,,,,,,,,,,59,,,,,,,,,,,,39,
+ android.database,59,,41,,,,,,,,,,,,,,,,,,,,,,,,,,59,,,,,,,,,,,,41,
- com.google.common.base,4,,85,,,,,,,,,,,,,,,,,,,,3,1,,,,,,,,,,,,,,,,,62,23
+ com.google.common.base,4,,87,,,,,,,,,,,,,,,,,,,,3,1,,,,,,,,,,,,,,,,,63,24
- java.nio,16,,16,,13,,,,,,,,,,,,,,,1,,,,,,,,,,,,,2,,,,,,,,16,
+ java.nio,16,,17,,13,,,,,,,,,,,,,,,1,,,,,,,,,,,,,2,,,,,,,,17,
- org.springframework.http,14,,70,,,,,,,,,,,,,,,14,,,,,,,,,,,,,,,,,,,,,,,60,10
+ org.springframework.http,14,,71,,,,,,,,,,,,,,,14,,,,,,,,,,,,,,,,,,,,,,,61,10
- org.springframework.web.util,,,163,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,138,25
+ org.springframework.web.util,,,165,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,140,25

@github-actions
Copy link
Contributor

⚠️ The head of this PR and the base branch were compared for differences in the framework coverage reports. The generated reports are available in the artifacts of this workflow run. The differences will be picked up by the nightly job after the PR gets merged.

Click to show differences in coverage

java

Generated file changes for java

  • Changes to framework-coverage-java.rst:
-    Android,``android.*``,52,479,138,,,3,67,,,
+    Android,``android.*``,52,481,138,,,3,67,,,
-    `Google Guava <https://guava.dev/>`_,``com.google.common.*``,,728,39,,6,,,,,
+    `Google Guava <https://guava.dev/>`_,``com.google.common.*``,,730,39,,6,,,,,
-    Java Standard Library,``java.*``,3,615,147,32,,,9,,,12
+    Java Standard Library,``java.*``,3,616,147,32,,,9,,,12
-    `Spring <https://spring.io/>`_,``org.springframework.*``,29,477,101,,,,19,14,,29
+    `Spring <https://spring.io/>`_,``org.springframework.*``,29,480,101,,,,19,14,,29
-    Totals,,217,8477,1612,140,6,10,113,33,1,97
+    Totals,,217,8485,1612,140,6,10,113,33,1,97
  • Changes to framework-coverage-java.csv:
- android.database,59,,39,,,,,,,,,,,,,,,,,,,,,,,,,,59,,,,,,,,,,,,39,
+ android.database,59,,41,,,,,,,,,,,,,,,,,,,,,,,,,,59,,,,,,,,,,,,41,
- com.google.common.base,4,,85,,,,,,,,,,,,,,,,,,,,3,1,,,,,,,,,,,,,,,,,62,23
+ com.google.common.base,4,,87,,,,,,,,,,,,,,,,,,,,3,1,,,,,,,,,,,,,,,,,63,24
- java.nio,20,,15,,15,,,,,,,,,,,,,,,3,,,,,,,,,,,,,2,,,,,,,,15,
+ java.nio,20,,16,,15,,,,,,,,,,,,,,,3,,,,,,,,,,,,,2,,,,,,,,16,
- org.springframework.http,14,,70,,,,,,,,,,,,,,,14,,,,,,,,,,,,,,,,,,,,,,,60,10
+ org.springframework.http,14,,71,,,,,,,,,,,,,,,14,,,,,,,,,,,,,,,,,,,,,,,61,10
- org.springframework.web.util,,,163,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,138,25
+ org.springframework.web.util,,,165,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,140,25

@github-actions
Copy link
Contributor

⚠️ The head of this PR and the base branch were compared for differences in the framework coverage reports. The generated reports are available in the artifacts of this workflow run. The differences will be picked up by the nightly job after the PR gets merged.

Click to show differences in coverage

java

Generated file changes for java

  • Changes to framework-coverage-java.rst:
-    Android,``android.*``,52,479,138,,,3,67,,,
+    Android,``android.*``,52,481,138,,,3,67,,,
-    `Google Guava <https://guava.dev/>`_,``com.google.common.*``,,728,39,,6,,,,,
+    `Google Guava <https://guava.dev/>`_,``com.google.common.*``,,730,39,,6,,,,,
-    Java Standard Library,``java.*``,3,615,147,32,,,9,,,12
+    Java Standard Library,``java.*``,3,616,147,32,,,9,,,12
-    `Spring <https://spring.io/>`_,``org.springframework.*``,29,477,101,,,,19,14,,29
+    `Spring <https://spring.io/>`_,``org.springframework.*``,29,480,101,,,,19,14,,29
-    Totals,,217,8477,1612,140,6,10,113,33,1,97
+    Totals,,217,8485,1612,140,6,10,113,33,1,97
  • Changes to framework-coverage-java.csv:
- android.database,59,,39,,,,,,,,,,,,,,,,,,,,,,,,,,59,,,,,,,,,,,,39,
+ android.database,59,,41,,,,,,,,,,,,,,,,,,,,,,,,,,59,,,,,,,,,,,,41,
- com.google.common.base,4,,85,,,,,,,,,,,,,,,,,,,,3,1,,,,,,,,,,,,,,,,,62,23
+ com.google.common.base,4,,87,,,,,,,,,,,,,,,,,,,,3,1,,,,,,,,,,,,,,,,,63,24
- java.nio,20,,15,,15,,,,,,,,,,,,,,,3,,,,,,,,,,,,,2,,,,,,,,15,
+ java.nio,20,,16,,15,,,,,,,,,,,,,,,3,,,,,,,,,,,,,2,,,,,,,,16,
- org.springframework.http,14,,70,,,,,,,,,,,,,,,14,,,,,,,,,,,,,,,,,,,,,,,60,10
+ org.springframework.http,14,,71,,,,,,,,,,,,,,,14,,,,,,,,,,,,,,,,,,,,,,,61,10
- org.springframework.web.util,,,163,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,138,25
+ org.springframework.web.util,,,165,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,140,25

@github-actions
Copy link
Contributor

⚠️ The head of this PR and the base branch were compared for differences in the framework coverage reports. The generated reports are available in the artifacts of this workflow run. The differences will be picked up by the nightly job after the PR gets merged.

Click to show differences in coverage

java

Generated file changes for java

  • Changes to framework-coverage-java.rst:
-    Android,``android.*``,52,479,138,,,3,67,,,
+    Android,``android.*``,52,481,138,,,3,67,,,
-    `Google Guava <https://guava.dev/>`_,``com.google.common.*``,,728,39,,6,,,,,
+    `Google Guava <https://guava.dev/>`_,``com.google.common.*``,,730,39,,6,,,,,
-    Java Standard Library,``java.*``,3,615,147,32,,,9,,,12
+    Java Standard Library,``java.*``,3,616,147,32,,,9,,,12
-    `Spring <https://spring.io/>`_,``org.springframework.*``,29,477,101,,,,19,14,,29
+    `Spring <https://spring.io/>`_,``org.springframework.*``,29,480,101,,,,19,14,,29
-    Totals,,217,8477,1612,140,6,10,113,33,1,97
+    Totals,,217,8485,1612,140,6,10,113,33,1,97
  • Changes to framework-coverage-java.csv:
- android.database,59,,39,,,,,,,,,,,,,,,,,,,,,,,,,,59,,,,,,,,,,,,39,
+ android.database,59,,41,,,,,,,,,,,,,,,,,,,,,,,,,,59,,,,,,,,,,,,41,
- com.google.common.base,4,,85,,,,,,,,,,,,,,,,,,,,3,1,,,,,,,,,,,,,,,,,62,23
+ com.google.common.base,4,,87,,,,,,,,,,,,,,,,,,,,3,1,,,,,,,,,,,,,,,,,63,24
- java.nio,20,,15,,15,,,,,,,,,,,,,,,3,,,,,,,,,,,,,2,,,,,,,,15,
+ java.nio,20,,16,,15,,,,,,,,,,,,,,,3,,,,,,,,,,,,,2,,,,,,,,16,
- org.springframework.http,14,,70,,,,,,,,,,,,,,,14,,,,,,,,,,,,,,,,,,,,,,,60,10
+ org.springframework.http,14,,71,,,,,,,,,,,,,,,14,,,,,,,,,,,,,,,,,,,,,,,61,10
- org.springframework.web.util,,,163,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,138,25
+ org.springframework.web.util,,,165,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,140,25

@michaelnebel michaelnebel marked this pull request as ready for review March 20, 2023 12:31
@michaelnebel michaelnebel requested review from a team as code owners March 20, 2023 12:31
Copy link
Contributor

@tausbn tausbn left a comment

Choose a reason for hiding this comment

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

Python 👍

Copy link
Contributor

@atorralba atorralba left a comment

Choose a reason for hiding this comment

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

Java LGTM (didn't review all the YMLs, only the CodeQL).

@michaelnebel
Copy link
Contributor Author

DCA looks good.
Merging now to avoid further conflicts.

@michaelnebel michaelnebel merged commit 17b3383 into github:main Mar 20, 2023
@michaelnebel michaelnebel deleted the java/argumentthis branch March 20, 2023 15:00
koesie10 added a commit to github/vscode-codeql that referenced this pull request Apr 25, 2023
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.

3 participants