From 9891980cbe09a93b2472d44178c3d1ac9edf0cf0 Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Sun, 28 Jan 2024 16:14:25 -0700 Subject: [PATCH 01/16] initial support for dart3 --- .github/workflows/tests.yaml | 17 +- Makefile | 3 + snapshots/input/dart3-features/.tool-versions | 1 + snapshots/input/dart3-features/lib/main.dart | 65 ++++ snapshots/input/dart3-features/pubspec.lock | 5 + snapshots/input/dart3-features/pubspec.yaml | 5 + snapshots/output/dart3-features/lib/main.dart | 289 ++++++++++++++++++ 7 files changed, 378 insertions(+), 7 deletions(-) create mode 100644 snapshots/input/dart3-features/.tool-versions create mode 100644 snapshots/input/dart3-features/lib/main.dart create mode 100644 snapshots/input/dart3-features/pubspec.lock create mode 100644 snapshots/input/dart3-features/pubspec.yaml create mode 100755 snapshots/output/dart3-features/lib/main.dart diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 216e7870..7a53fcda 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -24,13 +24,12 @@ jobs: - name: dart pub get scip-dart package run: dart pub get - - name: dart pub get basic-project directory - run: dart pub get - working-directory: ./snapshots/input/basic-project - - - name: dart pub get diagnostics directory - run: dart pub get - working-directory: ./snapshots/input/diagnostics + - name: pub get + working-directory: ./snapshots/input + run: | + (cd basic-project && dart pub get) + (cd diagnostics && dart pub get) + (cd dart3-features && dart pub get) - name: Snapshots Diff Check run: | @@ -40,6 +39,9 @@ jobs: dart run scip_dart ./snapshots/input/diagnostics ./scip snapshot --to ./snapshots/output/diagnostics + dart run scip_dart ./snapshots/input/dart3-features + ./scip snapshot --to ./snapshots/output/dart3-features + if [[ -z "$(git status --porcelain ./snapshots/output)" ]]; then echo "No changes to snapshot files" @@ -51,6 +53,7 @@ jobs: exit 1 fi + consumer: runs-on: ubuntu-latest strategy: diff --git a/Makefile b/Makefile index bdf91850..81f7689b 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,9 @@ regen-snapshots: dart run scip_dart ./snapshots/input/diagnostics scip snapshot --to ./snapshots/output/diagnostics + dart run scip_dart ./snapshots/input/dart3-features + scip snapshot --to ./snapshots/output/dart3-features + run: dart run scip_dart ./snapshots/input/staging-project --verbose diff --git a/snapshots/input/dart3-features/.tool-versions b/snapshots/input/dart3-features/.tool-versions new file mode 100644 index 00000000..07772a00 --- /dev/null +++ b/snapshots/input/dart3-features/.tool-versions @@ -0,0 +1 @@ +dart 3.1.0 diff --git a/snapshots/input/dart3-features/lib/main.dart b/snapshots/input/dart3-features/lib/main.dart new file mode 100644 index 00000000..67338643 --- /dev/null +++ b/snapshots/input/dart3-features/lib/main.dart @@ -0,0 +1,65 @@ +(String, int) userInfo(Map json) { + return (json['name'] as String, json['height'] as int); +} + +void parser(int charCode) { + const slash = 1; + const star = 2; + const plus = 3; + const minus = 4; + + final nextCharCode = 'a'; + const digit0 = 0; + const digit9 = 9; + + void skipComment() {} + void operatorFn(int charCode) {} + void number() {} + void invalid() {} + + switch (charCode) { + case slash when nextCharCode == slash: + skipComment(); + + case slash || star || plus || minus: + operatorFn(charCode); + + case >= digit0 && <= digit9: + number(); + + default: + invalid(); + } +} + +const six = 6; +const msg = 'Feeling the Monday blues?'; +String describeDate(DateTime dt) { + const one = 1; + return switch (dt.weekday) { + one => 'Feeling the Monday blues?', + 7 || six => 'Enjoy the weekend!', + _ => 'Hang in there.' + }; +} + +void main() { + var ( + String name, + int height, + ) = userInfo({'name': 'Michael', 'height': 180}); + print('User $name is $height cm tall.'); + + final json = {'name': 'Michael', 'height': 180}; + if (json case {'name': 'Michael', 'height': int h}) { + print('Michael is $h cm tall.'); + } +} + +base class Foo {} + +final class Bar {} + +interface class Car {} + +sealed class Zar {} diff --git a/snapshots/input/dart3-features/pubspec.lock b/snapshots/input/dart3-features/pubspec.lock new file mode 100644 index 00000000..573410f7 --- /dev/null +++ b/snapshots/input/dart3-features/pubspec.lock @@ -0,0 +1,5 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: {} +sdks: + dart: ">=3.0.0 <4.0.0" diff --git a/snapshots/input/dart3-features/pubspec.yaml b/snapshots/input/dart3-features/pubspec.yaml new file mode 100644 index 00000000..a61ac8bc --- /dev/null +++ b/snapshots/input/dart3-features/pubspec.yaml @@ -0,0 +1,5 @@ +name: dart3_features +version: 1.0.0 + +environment: + sdk: ">=3.0.0 <4.0.0" \ No newline at end of file diff --git a/snapshots/output/dart3-features/lib/main.dart b/snapshots/output/dart3-features/lib/main.dart new file mode 100755 index 00000000..b6356258 --- /dev/null +++ b/snapshots/output/dart3-features/lib/main.dart @@ -0,0 +1,289 @@ + (String, int) userInfo(Map json) { +// definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/ +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# +// ^^^^^^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/userInfo(). +// documentation +// > ```dart +// > (String, int) userInfo(Map json) +// > ``` +// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`map.dart`/Map# +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^^ definition local 0 +// documentation +// > ```dart +// > Map json +// > ``` + return (json['name'] as String, json['height'] as int); +// ^^^^ reference local 0 +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^^ reference local 0 +// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# + } + + void parser(int charCode) { +// ^^^^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/parser(). +// documentation +// > ```dart +// > void parser(int charCode) +// > ``` +// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# +// ^^^^^^^^ definition local 1 +// documentation +// > ```dart +// > int charCode +// > ``` + const slash = 1; +// ^^^^^ definition local 2 +// documentation +// > ```dart +// > int slash +// > ``` + const star = 2; +// ^^^^ definition local 3 +// documentation +// > ```dart +// > int star +// > ``` + const plus = 3; +// ^^^^ definition local 4 +// documentation +// > ```dart +// > int plus +// > ``` + const minus = 4; +// ^^^^^ definition local 5 +// documentation +// > ```dart +// > int minus +// > ``` + + final nextCharCode = 'a'; +// ^^^^^^^^^^^^ definition local 6 +// documentation +// > ```dart +// > String nextCharCode +// > ``` +// diagnostic Information: +// > The value of the local variable 'nextCharCode' isn't used. + const digit0 = 0; +// ^^^^^^ definition local 7 +// documentation +// > ```dart +// > int digit0 +// > ``` + const digit9 = 9; +// ^^^^^^ definition local 8 +// documentation +// > ```dart +// > int digit9 +// > ``` + + void skipComment() {} +// ^^^^^^^^^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/skipComment(). +// documentation +// > ```dart +// > void skipComment() +// > ``` + void operatorFn(int charCode) {} +// ^^^^^^^^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/operatorFn(). +// documentation +// > ```dart +// > void operatorFn(int charCode) +// > ``` +// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# +// ^^^^^^^^ definition local 9 +// documentation +// > ```dart +// > int charCode +// > ``` + void number() {} +// ^^^^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/number(). +// documentation +// > ```dart +// > void number() +// > ``` + void invalid() {} +// ^^^^^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/invalid(). +// documentation +// > ```dart +// > void invalid() +// > ``` + + switch (charCode) { +// ^^^^^^^^ reference local 1 + case slash when nextCharCode == slash: +// ^^^^^ reference local 2 + skipComment(); +// ^^^^^^^^^^^ reference scip-dart pub dart3_features 1.0.0 lib/`main.dart`/skipComment(). + + case slash || star || plus || minus: +// ^^^^^ reference local 2 +// diagnostic Error: +// > The operands of the operator '||' must be assignable to 'bool'. +// diagnostic Error: +// > The switch case expression type 'bool' must be a subtype of the switch expression type 'int'. +// diagnostic Error: +// > In constant expressions, operands of this operator must be of type 'bool'. +// ^^^^ reference local 3 +// diagnostic Error: +// > The operands of the operator '||' must be assignable to 'bool'. +// ^^^^ reference local 4 +// diagnostic Error: +// > The operands of the operator '||' must be assignable to 'bool'. +// ^^^^^ reference local 5 +// diagnostic Error: +// > The operands of the operator '||' must be assignable to 'bool'. + operatorFn(charCode); +// ^^^^^^^^^^ reference scip-dart pub dart3_features 1.0.0 lib/`main.dart`/operatorFn(). +// ^^^^^^^^ reference local 1 + + case >= digit0 && <= digit9: +// ^^^^^^ reference local 7 +// ^^^^^^ reference local 8 + number(); +// ^^^^^^ reference scip-dart pub dart3_features 1.0.0 lib/`main.dart`/number(). + + default: + invalid(); +// ^^^^^^^ reference scip-dart pub dart3_features 1.0.0 lib/`main.dart`/invalid(). + } + } + + const six = 6; +// ^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/six. +// documentation +// > ```dart +// > int six +// > ``` + const msg = 'Feeling the Monday blues?'; +// ^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/msg. +// documentation +// > ```dart +// > String msg +// > ``` + String describeDate(DateTime dt) { +//^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^^^^^^^^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/describeDate(). +// documentation +// > ```dart +// > String describeDate(DateTime dt) +// > ``` +// ^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`date_time.dart`/DateTime# +// ^^ definition local 10 +// documentation +// > ```dart +// > DateTime dt +// > ``` + const one = 1; +// ^^^ definition local 11 +// documentation +// > ```dart +// > int one +// > ``` +// diagnostic Information: +// > The value of the local variable 'one' isn't used. + return switch (dt.weekday) { +// ^^ reference local 10 +// ^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`date_time.dart`/DateTime#weekday. + one => 'Feeling the Monday blues?', + 7 || six => 'Enjoy the weekend!', + _ => 'Hang in there.' + }; + } + + void main() { +// ^^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/main(). +// documentation +// > ```dart +// > void main() +// > ``` + var ( + String name, +// definition local 12 +// documentation +// > ```dart +// > dynamic +// > ``` +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^^ definition local 13 +// documentation +// > ```dart +// > String name +// > ``` + int height, +// ^^^ definition local 14 +// documentation +// > ```dart +// > String int +// > ``` +// diagnostic Error: +// > Expected to find ';'. +// diagnostic Information: +// > The value of the local variable 'int' isn't used. +// reference local 12 +// diagnostic Error: +// > Expected an identifier. +// diagnostic Error: +// > Unexpected text ';'. +// diagnostic Error: +// > Expected to find ';'. + ) = userInfo({'name': 'Michael', 'height': 180}); +// reference local 12 +// diagnostic Error: +// > Expected an identifier. +// diagnostic Error: +// > Unexpected text ';'. +// reference local 12 +// diagnostic Error: +// > Expected an identifier. +// ^^^^^^^^ reference scip-dart pub dart3_features 1.0.0 lib/`main.dart`/userInfo(). + print('User $name is $height cm tall.'); +// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^^^^ reference local 13 +// diagnostic Error: +// > The non-nullable local variable 'name' must be assigned before it can be used. + + final json = {'name': 'Michael', 'height': 180}; +// ^^^^ definition local 15 +// documentation +// > ```dart +// > Map json +// > ``` + if (json case {'name': 'Michael', 'height': int h}) { +// ^^^^ reference local 15 +// diagnostic Error: +// > Conditions must have a static type of 'bool'. + print('Michael is $h cm tall.'); +// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). + } + } + + base class Foo {} +// ^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/Foo# +// documentation +// > ```dart +// > class Foo +// > ``` + + final class Bar {} +// ^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/Bar# +// documentation +// > ```dart +// > class Bar +// > ``` + + interface class Car {} +// ^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/Car# +// documentation +// > ```dart +// > class Car +// > ``` + + sealed class Zar {} +// ^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/Zar# +// documentation +// > ```dart +// > class Zar +// > ``` + From 844e6df6f2b4bd686d25045d3bd7580923380480 Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Sun, 28 Jan 2024 16:16:06 -0700 Subject: [PATCH 02/16] bumped upper bound of package --- pubspec.lock | 78 ++++++++++++++++++++++++++-------------------------- pubspec.yaml | 2 +- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index 0735fca6..f11336a5 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,26 +5,26 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: e440ac42679dfc04bbbefb58ed225c994bc7e07fccc8a68ec7d3631a127e5da9 + sha256: ae92f5d747aee634b87f89d9946000c2de774be1d6ac3e58268224348cd0101a url: "https://pub.dev" source: hosted - version: "54.0.0" + version: "61.0.0" analyzer: dependency: "direct main" description: name: analyzer - sha256: "2c2e3721ee9fb36de92faa060f3480c81b23e904352b087e5c64224b1a044427" + sha256: ea3d8652bda62982addfd92fdc2d0214e5f82e43325104990d4f4c4a2a313562 url: "https://pub.dev" source: hosted - version: "5.6.0" + version: "5.13.0" args: dependency: "direct main" description: name: args - sha256: c372bb384f273f0c2a8aaaa226dad84dc27c8519a691b888725dec59518ad53a + sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 url: "https://pub.dev" source: hosted - version: "2.4.1" + version: "2.4.2" async: dependency: transitive description: @@ -69,10 +69,10 @@ packages: dependency: transitive description: name: build_resolvers - sha256: db49b8609ef8c81cca2b310618c3017c00f03a92af44c04d310b907b2d692d95 + sha256: "0713a05b0386bd97f9e63e78108805a4feca5898a4b821d6610857f10c91e975" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.4.0" build_runner: dependency: transitive description: @@ -85,10 +85,10 @@ packages: dependency: transitive description: name: build_runner_core - sha256: "14febe0f5bac5ae474117a36099b4de6f1dbc52df6c5e55534b3da9591bf4292" + sha256: "0671ad4162ed510b70d0eb4ad6354c249f8429cab4ae7a4cec86bbc2886eb76e" url: "https://pub.dev" source: hosted - version: "7.2.7" + version: "7.2.7+1" built_collection: dependency: transitive description: @@ -101,10 +101,10 @@ packages: dependency: transitive description: name: built_value - sha256: "598a2a682e2a7a90f08ba39c0aaa9374c5112340f0a2e275f61b59389543d166" + sha256: "69acb7007eb2a31dc901512bfe0f7b767168be34cb734835d54c070bfa74c1b2" url: "https://pub.dev" source: hosted - version: "8.6.1" + version: "8.8.0" chalk: dependency: "direct dev" description: @@ -117,18 +117,18 @@ packages: dependency: transitive description: name: checked_yaml - sha256: "3d1505d91afa809d177efd4eed5bb0eb65805097a1463abdd2add076effae311" + sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff url: "https://pub.dev" source: hosted - version: "2.0.2" + version: "2.0.3" code_builder: dependency: transitive description: name: code_builder - sha256: "0d43dd1288fd145de1ecc9a3948ad4a6d5a82f0a14c4fdd0892260787d975cbe" + sha256: "1be9be30396d7e4c0db42c35ea6ccd7cc6a1e19916b5dc64d6ac216b5544d677" url: "https://pub.dev" source: hosted - version: "4.4.0" + version: "4.7.0" collection: dependency: transitive description: @@ -149,10 +149,10 @@ packages: dependency: transitive description: name: crypto - sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67 + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "3.0.3" dart_dev: dependency: "direct dev" description: @@ -165,10 +165,10 @@ packages: dependency: transitive description: name: dart_style - sha256: "5be16bf1707658e4c03078d4a9b90208ded217fb02c163e207d334082412f2fb" + sha256: "1efa911ca7086affd35f463ca2fc1799584fb6aa89883cf0af8e3664d6a02d55" url: "https://pub.dev" source: hosted - version: "2.2.5" + version: "2.3.2" dependency_validator: dependency: "direct dev" description: @@ -189,10 +189,10 @@ packages: dependency: transitive description: name: fixnum - sha256: "04be3e934c52e082558cc9ee21f42f5c1cd7a1262f4c63cd0357c08d5bba81ec" + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "1.1.0" frontend_server_client: dependency: transitive description: @@ -205,10 +205,10 @@ packages: dependency: "direct dev" description: name: glob - sha256: "4515b5b6ddb505ebdd242a5f2cc5d22d3d6a80013789debfbda7777f47ea308c" + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" graphs: dependency: transitive description: @@ -245,26 +245,26 @@ packages: dependency: transitive description: name: js - sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7" + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 url: "https://pub.dev" source: hosted - version: "0.6.5" + version: "0.6.7" json_annotation: dependency: transitive description: name: json_annotation - sha256: c33da08e136c3df0190bd5bbe51ae1df4a7d96e7954d1d7249fea2968a72d317 + sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 url: "https://pub.dev" source: hosted - version: "4.8.0" + version: "4.8.1" logging: dependency: transitive description: name: logging - sha256: "04094f2eb032cbb06c6f6e8d3607edcfcb0455e2bb6cbc010cb01171dcb64e6d" + sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.2.0" matcher: dependency: transitive description: @@ -277,10 +277,10 @@ packages: dependency: transitive description: name: meta - sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" + sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.11.0" mime: dependency: transitive description: @@ -365,18 +365,18 @@ packages: dependency: transitive description: name: stack_trace - sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.11.1" stream_channel: dependency: transitive description: name: stream_channel - sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" stream_transform: dependency: transitive description: @@ -453,9 +453,9 @@ packages: dependency: transitive description: name: yaml - sha256: "23812a9b125b48d4007117254bca50abb6c712352927eece9e155207b1db2370" + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.2" sdks: - dart: ">=2.18.0 <3.0.0" + dart: ">=2.19.6 <3.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index d23a161a..fdf6fa11 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -4,7 +4,7 @@ description: generates scip bindings for dart files repository: https://github.com/Workiva/scip-dart environment: - sdk: ">=2.18.0 <3.0.0" + sdk: ">=2.19.6 <4.0.0" executables: scip_dart: From a338e6e88bf26d1909641a36cfa072432f3ba8f7 Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Sun, 28 Jan 2024 16:23:16 -0700 Subject: [PATCH 03/16] added dart 3 to snapshot tests --- .github/workflows/tests.yaml | 6 ++++-- Makefile | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 7a53fcda..4b8cb65c 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -10,6 +10,9 @@ on: jobs: snapshots: runs-on: ubuntu-latest + strategy: + matrix: + sdk: [2.19.6, 3.1.0] steps: - uses: actions/checkout@v3 - name: Install scip cli @@ -19,8 +22,7 @@ jobs: - uses: dart-lang/setup-dart@v1 with: - # use a fixed version number so changes to 'stable', dont break snapshot diffs (language version is used in the scip symbol) - sdk: 2.19.6 + sdk: ${{ matrix.sdk }} - name: dart pub get scip-dart package run: dart pub get diff --git a/Makefile b/Makefile index 81f7689b..28f99672 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,8 @@ regen-snapshots: + dart_version=$(dart --version | grep -o '[0-9]*\.[0-9]*\.[0-9]*' | awk 'NR==1') + dart run scip_dart ./snapshots/input/basic-project - scip snapshot --to ./snapshots/output/basic-project + scip snapshot --to "./snapshots/output/basic-project/$dart_version" dart run scip_dart ./snapshots/input/diagnostics scip snapshot --to ./snapshots/output/diagnostics From 249268eade2c206c71d5bb8e39a80fbd0e27e73e Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Sun, 28 Jan 2024 16:36:23 -0700 Subject: [PATCH 04/16] individual snaps per version --- .github/workflows/tests.yaml | 22 +- Makefile | 11 +- pubspec.lock | 54 +-- .../basic-project/{ => 2.19.6}/lib/main.dart | 14 +- .../basic-project/{ => 2.19.6}/lib/more.dart | 52 +-- .../basic-project/{ => 2.19.6}/lib/other.dart | 16 +- .../{ => 2.19.6}/lib/relationships.dart | 14 +- .../{ => 2.19.6}/test/basic_test.dart | 0 .../output/basic-project/3.1.0/lib/main.dart | 159 +++++++++ .../output/basic-project/3.1.0/lib/more.dart | 313 ++++++++++++++++++ .../output/basic-project/3.1.0/lib/other.dart | 151 +++++++++ .../3.1.0/lib/relationships.dart | 81 +++++ .../basic-project/3.1.0/test/basic_test.dart | 18 + .../dart3-features/{ => 2.19.6}/lib/main.dart | 104 ++---- .../output/dart3-features/3.1.0/lib/main.dart | 243 ++++++++++++++ .../diagnostics/{ => 2.19.6}/lib/main.dart | 16 +- .../output/diagnostics/3.1.0/lib/main.dart | 105 ++++++ tool/regen-snapshots.sh | 20 ++ 18 files changed, 1210 insertions(+), 183 deletions(-) rename snapshots/output/basic-project/{ => 2.19.6}/lib/main.dart (88%) rename snapshots/output/basic-project/{ => 2.19.6}/lib/more.dart (85%) rename snapshots/output/basic-project/{ => 2.19.6}/lib/other.dart (88%) rename snapshots/output/basic-project/{ => 2.19.6}/lib/relationships.dart (83%) rename snapshots/output/basic-project/{ => 2.19.6}/test/basic_test.dart (100%) create mode 100755 snapshots/output/basic-project/3.1.0/lib/main.dart create mode 100755 snapshots/output/basic-project/3.1.0/lib/more.dart create mode 100755 snapshots/output/basic-project/3.1.0/lib/other.dart create mode 100755 snapshots/output/basic-project/3.1.0/lib/relationships.dart create mode 100755 snapshots/output/basic-project/3.1.0/test/basic_test.dart rename snapshots/output/dart3-features/{ => 2.19.6}/lib/main.dart (68%) create mode 100755 snapshots/output/dart3-features/3.1.0/lib/main.dart rename snapshots/output/diagnostics/{ => 2.19.6}/lib/main.dart (85%) create mode 100755 snapshots/output/diagnostics/3.1.0/lib/main.dart create mode 100755 tool/regen-snapshots.sh diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 4b8cb65c..f0919291 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -13,6 +13,7 @@ jobs: strategy: matrix: sdk: [2.19.6, 3.1.0] + dir: [basic-project, diagnostics, dart3-features] steps: - uses: actions/checkout@v3 - name: Install scip cli @@ -23,33 +24,24 @@ jobs: - uses: dart-lang/setup-dart@v1 with: sdk: ${{ matrix.sdk }} - - name: dart pub get scip-dart package + - name: pub get scip-dart package run: dart pub get - name: pub get - working-directory: ./snapshots/input - run: | - (cd basic-project && dart pub get) - (cd diagnostics && dart pub get) - (cd dart3-features && dart pub get) + working-directory: ./snapshots/input/${{ matrix.dir }} + run: dart pub get - name: Snapshots Diff Check run: | - dart run scip_dart ./snapshots/input/basic-project - ./scip snapshot --to ./snapshots/output/basic-project - - dart run scip_dart ./snapshots/input/diagnostics - ./scip snapshot --to ./snapshots/output/diagnostics - - dart run scip_dart ./snapshots/input/dart3-features - ./scip snapshot --to ./snapshots/output/dart3-features + dart run scip_dart ./snapshots/input/${{ matrix.dir }} + ./scip snapshot --to ./snapshots/output/${{matrix.dir}}/${{matrix.sdk}} if [[ -z "$(git status --porcelain ./snapshots/output)" ]]; then echo "No changes to snapshot files" else echo - echo "Snapshot diff detected differences, run 'make gen-snaps' to re-generate snapshots" + echo "Snapshot diff detected differences, run 'make regen-snapshots' to re-generate snapshots" git status --short ./snapshots/output echo exit 1 diff --git a/Makefile b/Makefile index 28f99672..0c5c2287 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,5 @@ regen-snapshots: - dart_version=$(dart --version | grep -o '[0-9]*\.[0-9]*\.[0-9]*' | awk 'NR==1') - - dart run scip_dart ./snapshots/input/basic-project - scip snapshot --to "./snapshots/output/basic-project/$dart_version" - - dart run scip_dart ./snapshots/input/diagnostics - scip snapshot --to ./snapshots/output/diagnostics - - dart run scip_dart ./snapshots/input/dart3-features - scip snapshot --to ./snapshots/output/dart3-features + ./tool/regen-snapshots.sh run: dart run scip_dart ./snapshots/input/staging-project --verbose diff --git a/pubspec.lock b/pubspec.lock index f11336a5..c530529d 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -45,10 +45,10 @@ packages: dependency: transitive description: name: build - sha256: "3fbda25365741f8251b39f3917fb3c8e286a96fd068a5a242e11c2012d495777" + sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.4.1" build_config: dependency: transitive description: @@ -61,34 +61,34 @@ packages: dependency: transitive description: name: build_daemon - sha256: "757153e5d9cd88253cb13f28c2fb55a537dc31fefd98137549895b5beb7c6169" + sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "4.0.1" build_resolvers: dependency: transitive description: name: build_resolvers - sha256: "0713a05b0386bd97f9e63e78108805a4feca5898a4b821d6610857f10c91e975" + sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.2" build_runner: dependency: transitive description: name: build_runner - sha256: b0a8a7b8a76c493e85f1b84bffa0588859a06197863dba8c9036b15581fd9727 + sha256: "581bacf68f89ec8792f5e5a0b2c4decd1c948e97ce659dc783688c8a88fbec21" url: "https://pub.dev" source: hosted - version: "2.3.3" + version: "2.4.8" build_runner_core: dependency: transitive description: name: build_runner_core - sha256: "0671ad4162ed510b70d0eb4ad6354c249f8429cab4ae7a4cec86bbc2886eb76e" + sha256: c9e32d21dd6626b5c163d48b037ce906bbe428bc23ab77bcd77bb21e593b6185 url: "https://pub.dev" source: hosted - version: "7.2.7+1" + version: "7.2.11" built_collection: dependency: transitive description: @@ -101,10 +101,10 @@ packages: dependency: transitive description: name: built_value - sha256: "69acb7007eb2a31dc901512bfe0f7b767168be34cb734835d54c070bfa74c1b2" + sha256: a3ec2e0f967bc47f69f95009bb93db936288d61d5343b9436e378b28a2f830c6 url: "https://pub.dev" source: hosted - version: "8.8.0" + version: "8.9.0" chalk: dependency: "direct dev" description: @@ -125,10 +125,10 @@ packages: dependency: transitive description: name: code_builder - sha256: "1be9be30396d7e4c0db42c35ea6ccd7cc6a1e19916b5dc64d6ac216b5544d677" + sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 url: "https://pub.dev" source: hosted - version: "4.7.0" + version: "4.10.0" collection: dependency: transitive description: @@ -181,10 +181,10 @@ packages: dependency: transitive description: name: file - sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" url: "https://pub.dev" source: hosted - version: "6.1.4" + version: "7.0.0" fixnum: dependency: transitive description: @@ -245,10 +245,10 @@ packages: dependency: transitive description: name: js - sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + sha256: "4186c61b32f99e60f011f7160e32c89a758ae9b1d0c6d28e2c02ef0382300e2b" url: "https://pub.dev" source: hosted - version: "0.6.7" + version: "0.7.0" json_annotation: dependency: transitive description: @@ -269,10 +269,10 @@ packages: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" meta: dependency: transitive description: @@ -301,10 +301,10 @@ packages: dependency: "direct main" description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" pool: dependency: transitive description: @@ -405,10 +405,10 @@ packages: dependency: transitive description: name: test_api - sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.0" + version: "0.7.0" timing: dependency: transitive description: @@ -429,10 +429,10 @@ packages: dependency: transitive description: name: watcher - sha256: "6a7f46926b01ce81bfc339da6a7f20afbe7733eff9846f6d6a5466aa4c6667c0" + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "1.1.0" web_socket_channel: dependency: transitive description: @@ -458,4 +458,4 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=2.19.6 <3.0.0" + dart: ">=3.1.0-66.0.dev <4.0.0" diff --git a/snapshots/output/basic-project/lib/main.dart b/snapshots/output/basic-project/2.19.6/lib/main.dart similarity index 88% rename from snapshots/output/basic-project/lib/main.dart rename to snapshots/output/basic-project/2.19.6/lib/main.dart index cdaed412..cdfbda25 100755 --- a/snapshots/output/basic-project/lib/main.dart +++ b/snapshots/output/basic-project/2.19.6/lib/main.dart @@ -6,7 +6,7 @@ /// Takes a number /// Returns a number int fib(int n) { -//^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# +//^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# // ^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/fib(). // documentation // > ```dart @@ -16,7 +16,7 @@ // > This is a fib function // > Takes a number // > Returns a number -// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# +// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# // ^ definition local 0 // documentation // > ```dart @@ -37,14 +37,14 @@ // > ```dart // > void print_fib(int a) // > ``` -// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# +// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# // ^ definition local 1 // documentation // > ```dart // > int a // > ``` print(fib(a)); -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). // ^^^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/fib(). // ^ reference local 1 } @@ -56,7 +56,7 @@ // > String y // > ``` String capture() { -//^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +//^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# // ^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/capture(). // documentation // > ```dart @@ -96,7 +96,7 @@ // > int i // > ``` print(i); -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). // ^ reference local 3 } @@ -148,7 +148,7 @@ // > Reference class: [SomeLocalClass] // > Reference external class: [Foo] // > Missing Reference: [IDontExist] -// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# +// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# // ^^^^^ definition local 5 // documentation // > ```dart diff --git a/snapshots/output/basic-project/lib/more.dart b/snapshots/output/basic-project/2.19.6/lib/more.dart similarity index 85% rename from snapshots/output/basic-project/lib/more.dart rename to snapshots/output/basic-project/2.19.6/lib/more.dart index 9857ba25..016d705a 100755 --- a/snapshots/output/basic-project/lib/more.dart +++ b/snapshots/output/basic-project/2.19.6/lib/more.dart @@ -52,7 +52,7 @@ // > void sleep() // > ``` print('zzz...'); -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). } } @@ -65,7 +65,7 @@ // relationship scip-dart pub dart_test 1.0.0 lib/`more.dart`/SleepMixin# implementation // ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/SleepMixin# String name; -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# // ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#name. // documentation // > ```dart @@ -112,26 +112,26 @@ // ^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#cat. soundMaker = () => print('Meow!'); // ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#soundMaker. -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). break; case AnimalType.dog: // ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# // ^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#dog. soundMaker = () => print('Woof!'); // ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#soundMaker. -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). break; case AnimalType.bird: // ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# // ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#bird. soundMaker = () => print('Chirp!'); // ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#soundMaker. -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). break; default: soundMaker = () => print('Unknown animal type'); // ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#soundMaker. -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). } } @@ -146,15 +146,15 @@ } @override -// ^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`annotations.dart`/override. +// ^^^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`annotations.dart`/override. String toString() { -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# // ^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#toString(). // documentation // > ```dart // > String toString() // > ``` -// relationship scip-dart pub dart:core 2.19.0 dart:core/`object.dart`/Object#toString(). implementation reference +// relationship scip-dart pub dart:core 3.1.0 dart:core/`object.dart`/Object#toString(). implementation reference return '$name the $type'; // ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#name. // ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#type. @@ -162,14 +162,14 @@ } int calculateSum(List numbers) { -//^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# +//^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# // ^^^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/calculateSum(). // documentation // > ```dart // > int calculateSum(List numbers) // > ``` -// ^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`list.dart`/List# -// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# +// ^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`list.dart`/List# +// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# // ^^^^^^^ definition local 1 // documentation // > ```dart @@ -177,7 +177,7 @@ // > ``` return numbers.reduce((value, element) => value + element); // ^^^^^^^ reference local 1 -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`iterable.dart`/Iterable#reduce(). +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`iterable.dart`/Iterable#reduce(). // ^^^^^ definition local 2 // documentation // > ```dart @@ -199,15 +199,15 @@ // > void main() // > ``` List numbers = [1, 2, 3, 4, 5]; -// ^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`list.dart`/List# -// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# +// ^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`list.dart`/List# +// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# // ^^^^^^^ definition local 4 // documentation // > ```dart // > List numbers // > ``` int sum = calculateSum(numbers); -// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# +// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# // ^^^ definition local 5 // documentation // > ```dart @@ -254,23 +254,23 @@ // ^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/SleepMixin#sleep(). print(cat); -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). // ^^^ reference local 6 print(dog); -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). // ^^^ reference local 7 print('The sum of $numbers is $sum'); -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). // ^^^^^^^ reference local 4 // ^^^ reference local 5 print(math.Rectangle(1,2,3,4)); -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). // ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/math. -// ^^^^^^^^^ reference scip-dart pub dart:math 2.19.0 dart:math/`rectangle.dart`/Rectangle# +// ^^^^^^^^^ reference scip-dart pub dart:math 3.1.0 dart:math/`rectangle.dart`/Rectangle# [1,2].reduce((a, b) => a + b); -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`iterable.dart`/Iterable#reduce(). +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`iterable.dart`/Iterable#reduce(). // ^ definition local 8 // documentation // > ```dart @@ -291,8 +291,8 @@ // > ```dart // > void test(String Function(int) p) // > ``` -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# -// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# +// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# // ^ definition local 10 // documentation // > ```dart @@ -304,8 +304,8 @@ // > ```dart // > void deepTest(String Function(void Function(String)) p) // > ``` -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# // ^ definition local 11 // documentation // > ```dart diff --git a/snapshots/output/basic-project/lib/other.dart b/snapshots/output/basic-project/2.19.6/lib/other.dart similarity index 88% rename from snapshots/output/basic-project/lib/other.dart rename to snapshots/output/basic-project/2.19.6/lib/other.dart index be295c20..50c122d6 100755 --- a/snapshots/output/basic-project/lib/other.dart +++ b/snapshots/output/basic-project/2.19.6/lib/other.dart @@ -13,30 +13,30 @@ // > class Foo // > ``` int _far; -// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# +// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# // ^^^^ definition local 0 // documentation // > ```dart // > int _far // > ``` -// diagnostic Information: +// diagnostic Warning: // > The value of the field '_far' isn't used. bool value; -// ^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`bool.dart`/bool# +// ^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`bool.dart`/bool# // ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value. // documentation // > ```dart // > bool value // > ``` String value2; -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# // ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value2. // documentation // > ```dart // > String value2 // > ``` double value3; -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`double.dart`/double# +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`double.dart`/double# // ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value3. // documentation // > ```dart @@ -76,7 +76,7 @@ // > class Bar // > ``` String _someValue; -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# // ^^^^^^^^^^ definition local 2 // documentation // > ```dart @@ -105,7 +105,7 @@ _someValue = 'asdf'; // ^^^^^^^^^^ reference local 2 print(_someValue); -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). // ^^^^^^^^^^ reference local 2 } } @@ -118,7 +118,7 @@ // > ``` more.loadLibrary().then((_) => { // ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/more. -// ^^^^ reference scip-dart pub dart:async 2.19.0 dart:async/`future.dart`/Future#then(). +// ^^^^ reference scip-dart pub dart:async 3.1.0 dart:async/`future.dart`/Future#then(). // ^ definition local 4 // documentation // > ```dart diff --git a/snapshots/output/basic-project/lib/relationships.dart b/snapshots/output/basic-project/2.19.6/lib/relationships.dart similarity index 83% rename from snapshots/output/basic-project/lib/relationships.dart rename to snapshots/output/basic-project/2.19.6/lib/relationships.dart index 174afc43..3152f9d7 100755 --- a/snapshots/output/basic-project/lib/relationships.dart +++ b/snapshots/output/basic-project/2.19.6/lib/relationships.dart @@ -6,7 +6,7 @@ // > abstract class Mammal // > ``` String get hierarchy; -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# // ^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal#hierarchy. // documentation // > ```dart @@ -23,7 +23,7 @@ // relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal# implementation // ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal# String sound() => 'NOISE!'; -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# // ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal#sound(). // documentation // > ```dart @@ -43,7 +43,7 @@ // > ```dart // > void execute() // > ``` -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). } class Dog extends Animal with SwimAction { @@ -58,9 +58,9 @@ // ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal# // ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/SwimAction# @override -// ^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`annotations.dart`/override. +// ^^^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`annotations.dart`/override. String sound() => 'woof'; -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# // ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Dog#sound(). // documentation // > ```dart @@ -69,9 +69,9 @@ // relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal#sound(). implementation reference @override -// ^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`annotations.dart`/override. +// ^^^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`annotations.dart`/override. String get hierarchy => 'dog.animal.mammal'; -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# // ^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Dog#hierarchy. // documentation // > ```dart diff --git a/snapshots/output/basic-project/test/basic_test.dart b/snapshots/output/basic-project/2.19.6/test/basic_test.dart similarity index 100% rename from snapshots/output/basic-project/test/basic_test.dart rename to snapshots/output/basic-project/2.19.6/test/basic_test.dart diff --git a/snapshots/output/basic-project/3.1.0/lib/main.dart b/snapshots/output/basic-project/3.1.0/lib/main.dart new file mode 100755 index 00000000..cdfbda25 --- /dev/null +++ b/snapshots/output/basic-project/3.1.0/lib/main.dart @@ -0,0 +1,159 @@ + import 'package:dart_test/other.dart'; +// definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/ + + /// This is a fib function + /// + /// Takes a number + /// Returns a number + int fib(int n) { +//^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# +// ^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/fib(). +// documentation +// > ```dart +// > int fib(int n) +// > ``` +// documentation +// > This is a fib function +// > Takes a number +// > Returns a number +// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# +// ^ definition local 0 +// documentation +// > ```dart +// > int n +// > ``` + if (n <= 1) return 0; +// ^ reference local 0 + return fib(n - 1) + fib(n - 2); +// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/fib(). +// ^ reference local 0 +// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/fib(). +// ^ reference local 0 + } + + void print_fib(int a) { +// ^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/print_fib(). +// documentation +// > ```dart +// > void print_fib(int a) +// > ``` +// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# +// ^ definition local 1 +// documentation +// > ```dart +// > int a +// > ``` + print(fib(a)); +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). +// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/fib(). +// ^ reference local 1 + } + + final y = 'Hello'; +// ^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/y. +// documentation +// > ```dart +// > String y +// > ``` + String capture() { +//^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# +// ^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/capture(). +// documentation +// > ```dart +// > String capture() +// > ``` + return y; +// ^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/y. + } + + final capture_lambda = () => y; +// ^^^^^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/capture_lambda. +// documentation +// > ```dart +// > String Function() capture_lambda +// > ``` +// ^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/y. + + void main() { +// ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/main(). +// documentation +// > ```dart +// > void main() +// > ``` + for (var i = 0; i <= 10; i++) {} +// ^ definition local 2 +// documentation +// > ```dart +// > int i +// > ``` +// ^ reference local 2 +// ^ reference local 2 + + for (var i in [1, 2, 3]) { +// ^ definition local 3 +// documentation +// > ```dart +// > int i +// > ``` + print(i); +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). +// ^ reference local 3 + } + + var a = 0; +// ^ definition local 4 +// documentation +// > ```dart +// > int a +// > ``` + a = 1; +// ^ reference local 4 + print_fib(a); +// ^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/print_fib(). +// ^ reference local 4 + } + + void forever() { +// ^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/forever(). +// documentation +// > ```dart +// > void forever() +// > ``` + return forever(); +// ^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/forever(). + } + + class SomeLocalClass {} +// ^^^^^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/SomeLocalClass# +// documentation +// > ```dart +// > class SomeLocalClass +// > ``` + + /// Reference parameter: [value] +// ^^^^^ reference local 5 + /// Reference class: [SomeLocalClass] +// ^^^^^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/SomeLocalClass# + /// Reference external class: [Foo] +// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo# + /// Missing Reference: [IDontExist] + void someFunction(int value) { +// ^^^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/someFunction(). +// documentation +// > ```dart +// > void someFunction(int value) +// > ``` +// documentation +// > Reference parameter: [value] +// > Reference class: [SomeLocalClass] +// > Reference external class: [Foo] +// > Missing Reference: [IDontExist] +// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# +// ^^^^^ definition local 5 +// documentation +// > ```dart +// > int value +// > ``` + Foo(1); +// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo# + } diff --git a/snapshots/output/basic-project/3.1.0/lib/more.dart b/snapshots/output/basic-project/3.1.0/lib/more.dart new file mode 100755 index 00000000..016d705a --- /dev/null +++ b/snapshots/output/basic-project/3.1.0/lib/more.dart @@ -0,0 +1,313 @@ + import 'dart:math' as math; +// definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/ +// ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/math. +// documentation +// > ```dart +// > as math +// > ``` + + enum AnimalType { +// ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# +// documentation +// > ```dart +// > enum AnimalType +// > ``` + cat, +// ^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#cat. +// documentation +// > ```dart +// > AnimalType cat +// > ``` + dog, +// ^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#dog. +// documentation +// > ```dart +// > AnimalType dog +// > ``` + bird, +// ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#bird. +// documentation +// > ```dart +// > AnimalType bird +// > ``` + } + + typedef SoundMaker = void Function(); +// ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/SoundMaker# +// documentation +// > ```dart +// > typedef SoundMaker = void Function() +// > ``` + + mixin SleepMixin { +// ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/SleepMixin# +// documentation +// > ```dart +// > mixin SleepMixin on Object +// > ``` + void sleep() { +// ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/SleepMixin#sleep(). +// documentation +// > ```dart +// > void sleep() +// > ``` + print('zzz...'); +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). + } + } + + class Animal with SleepMixin { +// ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal# +// documentation +// > ```dart +// > class Animal with SleepMixin +// > ``` +// relationship scip-dart pub dart_test 1.0.0 lib/`more.dart`/SleepMixin# implementation +// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/SleepMixin# + String name; +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# +// ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#name. +// documentation +// > ```dart +// > String name +// > ``` + AnimalType type; +// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# +// ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#type. +// documentation +// > ```dart +// > AnimalType type +// > ``` + SoundMaker? soundMaker; +// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/SoundMaker# +// ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#soundMaker. +// documentation +// > ```dart +// > void Function() soundMaker +// > ``` + + Animal(this.name, {required this.type}) { +// ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#``(). +// documentation +// > ```dart +// > Animal Animal(String name, {required AnimalType type}) +// > ``` +// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal# +// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#name. +// ^^^^ definition local 0 +// documentation +// > ```dart +// > String name +// > ``` +// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#type. +// ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#``().(type) +// documentation +// > ```dart +// > {required AnimalType type} +// > ``` + switch (type) { +// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#type. + case AnimalType.cat: +// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# +// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#cat. + soundMaker = () => print('Meow!'); +// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#soundMaker. +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). + break; + case AnimalType.dog: +// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# +// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#dog. + soundMaker = () => print('Woof!'); +// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#soundMaker. +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). + break; + case AnimalType.bird: +// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# +// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#bird. + soundMaker = () => print('Chirp!'); +// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#soundMaker. +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). + break; + default: + soundMaker = () => print('Unknown animal type'); +// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#soundMaker. +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). + } + } + + void makeSound() { +// ^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#makeSound(). +// documentation +// > ```dart +// > void makeSound() +// > ``` + soundMaker?.call(); +// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#soundMaker. + } + + @override +// ^^^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`annotations.dart`/override. + String toString() { +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# +// ^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#toString(). +// documentation +// > ```dart +// > String toString() +// > ``` +// relationship scip-dart pub dart:core 3.1.0 dart:core/`object.dart`/Object#toString(). implementation reference + return '$name the $type'; +// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#name. +// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#type. + } + } + + int calculateSum(List numbers) { +//^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# +// ^^^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/calculateSum(). +// documentation +// > ```dart +// > int calculateSum(List numbers) +// > ``` +// ^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`list.dart`/List# +// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# +// ^^^^^^^ definition local 1 +// documentation +// > ```dart +// > List numbers +// > ``` + return numbers.reduce((value, element) => value + element); +// ^^^^^^^ reference local 1 +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`iterable.dart`/Iterable#reduce(). +// ^^^^^ definition local 2 +// documentation +// > ```dart +// > int value +// > ``` +// ^^^^^^^ definition local 3 +// documentation +// > ```dart +// > int element +// > ``` +// ^^^^^ reference local 2 +// ^^^^^^^ reference local 3 + } + + void main() { +// ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/main(). +// documentation +// > ```dart +// > void main() +// > ``` + List numbers = [1, 2, 3, 4, 5]; +// ^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`list.dart`/List# +// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# +// ^^^^^^^ definition local 4 +// documentation +// > ```dart +// > List numbers +// > ``` + int sum = calculateSum(numbers); +// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# +// ^^^ definition local 5 +// documentation +// > ```dart +// > int sum +// > ``` +// ^^^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/calculateSum(). +// ^^^^^^^ reference local 4 + + Animal cat = Animal('Kitty', type: AnimalType.cat); +// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal# +// ^^^ definition local 6 +// documentation +// > ```dart +// > Animal cat +// > ``` +// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal# +// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#``().(type) +// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# +// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#cat. + Animal dog = Animal('Buddy', type: AnimalType.dog); +// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal# +// ^^^ definition local 7 +// documentation +// > ```dart +// > Animal dog +// > ``` +// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal# +// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#``().(type) +// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# +// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#dog. + + cat.makeSound(); +// ^^^ reference local 6 +// ^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#makeSound(). + cat.sleep(); +// ^^^ reference local 6 +// ^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/SleepMixin#sleep(). + + dog.makeSound(); +// ^^^ reference local 7 +// ^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#makeSound(). + dog.sleep(); +// ^^^ reference local 7 +// ^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/SleepMixin#sleep(). + + print(cat); +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). +// ^^^ reference local 6 + print(dog); +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). +// ^^^ reference local 7 + print('The sum of $numbers is $sum'); +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). +// ^^^^^^^ reference local 4 +// ^^^ reference local 5 + + print(math.Rectangle(1,2,3,4)); +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). +// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/math. +// ^^^^^^^^^ reference scip-dart pub dart:math 3.1.0 dart:math/`rectangle.dart`/Rectangle# + + [1,2].reduce((a, b) => a + b); +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`iterable.dart`/Iterable#reduce(). +// ^ definition local 8 +// documentation +// > ```dart +// > int a +// > ``` +// ^ definition local 9 +// documentation +// > ```dart +// > int b +// > ``` +// ^ reference local 8 +// ^ reference local 9 + } + + void test(String Function(int) p) {} +// ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/test(). +// documentation +// > ```dart +// > void test(String Function(int) p) +// > ``` +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# +// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# +// ^ definition local 10 +// documentation +// > ```dart +// > String Function(int) p +// > ``` + void deepTest(String Function(void Function(String test)) p) {} +// ^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/deepTest(). +// documentation +// > ```dart +// > void deepTest(String Function(void Function(String)) p) +// > ``` +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# +// ^ definition local 11 +// documentation +// > ```dart +// > String Function(void Function(String)) p +// > ``` diff --git a/snapshots/output/basic-project/3.1.0/lib/other.dart b/snapshots/output/basic-project/3.1.0/lib/other.dart new file mode 100755 index 00000000..50c122d6 --- /dev/null +++ b/snapshots/output/basic-project/3.1.0/lib/other.dart @@ -0,0 +1,151 @@ + import 'more.dart' deferred as more; +// definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/ +// ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/more. +// documentation +// > ```dart +// > as more +// > ``` + + class Foo { +// ^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo# +// documentation +// > ```dart +// > class Foo +// > ``` + int _far; +// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# +// ^^^^ definition local 0 +// documentation +// > ```dart +// > int _far +// > ``` +// diagnostic Warning: +// > The value of the field '_far' isn't used. + bool value; +// ^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`bool.dart`/bool# +// ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value. +// documentation +// > ```dart +// > bool value +// > ``` + String value2; +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# +// ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value2. +// documentation +// > ```dart +// > String value2 +// > ``` + double value3; +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`double.dart`/double# +// ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value3. +// documentation +// > ```dart +// > double value3 +// > ``` + Foo(this._far); +// ^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``(). +// documentation +// > ```dart +// > Foo Foo(int _far) +// > ``` +// diagnostic Error: +// > Non-nullable instance field 'value' must be initialized. +// diagnostic Error: +// > Non-nullable instance field 'value2' must be initialized. +// diagnostic Error: +// > Non-nullable instance field 'value3' must be initialized. +// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo# +// diagnostic Error: +// > Non-nullable instance field 'value' must be initialized. +// diagnostic Error: +// > Non-nullable instance field 'value2' must be initialized. +// diagnostic Error: +// > Non-nullable instance field 'value3' must be initialized. +// ^^^^ reference local 0 +// ^^^^ definition local 1 +// documentation +// > ```dart +// > int _far +// > ``` + } + + class Bar { +// ^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Bar# +// documentation +// > ```dart +// > class Bar +// > ``` + String _someValue; +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# +// ^^^^^^^^^^ definition local 2 +// documentation +// > ```dart +// > String _someValue +// > ``` + Bar(this._someValue); +// ^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Bar#``(). +// documentation +// > ```dart +// > Bar Bar(String _someValue) +// > ``` +// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Bar# +// ^^^^ reference local 2 +// ^^^^^^^^^^ definition local 3 +// documentation +// > ```dart +// > String _someValue +// > ``` + + void someMethod() { +// ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Bar#someMethod(). +// documentation +// > ```dart +// > void someMethod() +// > ``` + _someValue = 'asdf'; +// ^^^^^^^^^^ reference local 2 + print(_someValue); +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). +// ^^^^^^^^^^ reference local 2 + } + } + + void main() { +// ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/main(). +// documentation +// > ```dart +// > void main() +// > ``` + more.loadLibrary().then((_) => { +// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/more. +// ^^^^ reference scip-dart pub dart:async 3.1.0 dart:async/`future.dart`/Future#then(). +// ^ definition local 4 +// documentation +// > ```dart +// > dynamic _ +// > ``` + Bar('a').someMethod.call() +// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Bar# +// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Bar#someMethod(). + }); + + Foo()..value = false; +// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo# +// ^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value. + + final someStr = 'someStr'; +// ^^^^^^^ definition local 5 +// documentation +// > ```dart +// > String someStr +// > ``` + Foo() +// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo# + ..value = true +// ^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value. + ..value2 = someStr +// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value2. +// ^^^^^^^ reference local 5 + ..value3 = 2.15 +// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value3. + } diff --git a/snapshots/output/basic-project/3.1.0/lib/relationships.dart b/snapshots/output/basic-project/3.1.0/lib/relationships.dart new file mode 100755 index 00000000..3152f9d7 --- /dev/null +++ b/snapshots/output/basic-project/3.1.0/lib/relationships.dart @@ -0,0 +1,81 @@ + abstract class Mammal { +// definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/ +// ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal# +// documentation +// > ```dart +// > abstract class Mammal +// > ``` + String get hierarchy; +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# +// ^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal#hierarchy. +// documentation +// > ```dart +// > String get hierarchy +// > ``` + } + + abstract class Animal extends Mammal { +// ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal# +// documentation +// > ```dart +// > abstract class Animal extends Mammal +// > ``` +// relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal# implementation +// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal# + String sound() => 'NOISE!'; +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# +// ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal#sound(). +// documentation +// > ```dart +// > String sound() +// > ``` + } + + mixin SwimAction { +// ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/SwimAction# +// documentation +// > ```dart +// > mixin SwimAction on Object +// > ``` + void execute() => print('swimming...'); +// ^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/SwimAction#execute(). +// documentation +// > ```dart +// > void execute() +// > ``` +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). + } + + class Dog extends Animal with SwimAction { +// ^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Dog# +// documentation +// > ```dart +// > class Dog extends Animal with SwimAction +// > ``` +// relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal# implementation +// relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal# implementation +// relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/SwimAction# implementation +// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal# +// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/SwimAction# + @override +// ^^^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`annotations.dart`/override. + String sound() => 'woof'; +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# +// ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Dog#sound(). +// documentation +// > ```dart +// > String sound() +// > ``` +// relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal#sound(). implementation reference + + @override +// ^^^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`annotations.dart`/override. + String get hierarchy => 'dog.animal.mammal'; +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# +// ^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Dog#hierarchy. +// documentation +// > ```dart +// > String get hierarchy +// > ``` +// relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal#hierarchy. implementation reference + } diff --git a/snapshots/output/basic-project/3.1.0/test/basic_test.dart b/snapshots/output/basic-project/3.1.0/test/basic_test.dart new file mode 100755 index 00000000..e06a01f9 --- /dev/null +++ b/snapshots/output/basic-project/3.1.0/test/basic_test.dart @@ -0,0 +1,18 @@ + import 'package:test/test.dart'; +// definition scip-dart pub dart_test 1.0.0 test/`basic_test.dart`/ + + void main() { +// ^^^^ definition scip-dart pub dart_test 1.0.0 test/`basic_test.dart`/main(). +// documentation +// > ```dart +// > void main() +// > ``` + group('some test', () { +// ^^^^^ reference scip-dart pub test_core 0.5.3 lib/`scaffolding.dart`/group(). + test('equality', () { +// ^^^^ reference scip-dart pub test_core 0.5.3 lib/`scaffolding.dart`/test(). + expect(1, 1); +// ^^^^^^ reference scip-dart pub matcher 0.12.16 lib/src/expect/`expect.dart`/expect(). + }); + }); + } diff --git a/snapshots/output/dart3-features/lib/main.dart b/snapshots/output/dart3-features/2.19.6/lib/main.dart similarity index 68% rename from snapshots/output/dart3-features/lib/main.dart rename to snapshots/output/dart3-features/2.19.6/lib/main.dart index b6356258..f9e7ade0 100755 --- a/snapshots/output/dart3-features/lib/main.dart +++ b/snapshots/output/dart3-features/2.19.6/lib/main.dart @@ -1,14 +1,14 @@ (String, int) userInfo(Map json) { // definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/ -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# -// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# +// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# // ^^^^^^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/userInfo(). // documentation // > ```dart // > (String, int) userInfo(Map json) // > ``` -// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`map.dart`/Map# -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`map.dart`/Map# +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# // ^^^^ definition local 0 // documentation // > ```dart @@ -16,9 +16,9 @@ // > ``` return (json['name'] as String, json['height'] as int); // ^^^^ reference local 0 -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# // ^^^^ reference local 0 -// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# +// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# } void parser(int charCode) { @@ -27,7 +27,7 @@ // > ```dart // > void parser(int charCode) // > ``` -// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# +// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# // ^^^^^^^^ definition local 1 // documentation // > ```dart @@ -64,8 +64,6 @@ // > ```dart // > String nextCharCode // > ``` -// diagnostic Information: -// > The value of the local variable 'nextCharCode' isn't used. const digit0 = 0; // ^^^^^^ definition local 7 // documentation @@ -91,7 +89,7 @@ // > ```dart // > void operatorFn(int charCode) // > ``` -// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# +// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# // ^^^^^^^^ definition local 9 // documentation // > ```dart @@ -114,26 +112,16 @@ // ^^^^^^^^ reference local 1 case slash when nextCharCode == slash: // ^^^^^ reference local 2 +// ^^^^^^^^^^^^ reference local 6 +// ^^^^^ reference local 2 skipComment(); // ^^^^^^^^^^^ reference scip-dart pub dart3_features 1.0.0 lib/`main.dart`/skipComment(). case slash || star || plus || minus: // ^^^^^ reference local 2 -// diagnostic Error: -// > The operands of the operator '||' must be assignable to 'bool'. -// diagnostic Error: -// > The switch case expression type 'bool' must be a subtype of the switch expression type 'int'. -// diagnostic Error: -// > In constant expressions, operands of this operator must be of type 'bool'. // ^^^^ reference local 3 -// diagnostic Error: -// > The operands of the operator '||' must be assignable to 'bool'. // ^^^^ reference local 4 -// diagnostic Error: -// > The operands of the operator '||' must be assignable to 'bool'. // ^^^^^ reference local 5 -// diagnostic Error: -// > The operands of the operator '||' must be assignable to 'bool'. operatorFn(charCode); // ^^^^^^^^^^ reference scip-dart pub dart3_features 1.0.0 lib/`main.dart`/operatorFn(). // ^^^^^^^^ reference local 1 @@ -163,13 +151,13 @@ // > String msg // > ``` String describeDate(DateTime dt) { -//^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +//^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# // ^^^^^^^^^^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/describeDate(). // documentation // > ```dart // > String describeDate(DateTime dt) // > ``` -// ^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`date_time.dart`/DateTime# +// ^^^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`date_time.dart`/DateTime# // ^^ definition local 10 // documentation // > ```dart @@ -181,13 +169,13 @@ // > ```dart // > int one // > ``` -// diagnostic Information: -// > The value of the local variable 'one' isn't used. return switch (dt.weekday) { // ^^ reference local 10 -// ^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`date_time.dart`/DateTime#weekday. +// ^^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`date_time.dart`/DateTime#weekday. one => 'Feeling the Monday blues?', +// ^^^ reference local 11 7 || six => 'Enjoy the weekend!', +// ^^^ reference scip-dart pub dart3_features 1.0.0 lib/`main.dart`/six. _ => 'Hang in there.' }; } @@ -200,62 +188,28 @@ // > ``` var ( String name, -// definition local 12 -// documentation -// > ```dart -// > dynamic -// > ``` -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# -// ^^^^ definition local 13 -// documentation -// > ```dart -// > String name -// > ``` +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# int height, -// ^^^ definition local 14 -// documentation -// > ```dart -// > String int -// > ``` -// diagnostic Error: -// > Expected to find ';'. -// diagnostic Information: -// > The value of the local variable 'int' isn't used. -// reference local 12 -// diagnostic Error: -// > Expected an identifier. -// diagnostic Error: -// > Unexpected text ';'. -// diagnostic Error: -// > Expected to find ';'. +// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# ) = userInfo({'name': 'Michael', 'height': 180}); -// reference local 12 -// diagnostic Error: -// > Expected an identifier. -// diagnostic Error: -// > Unexpected text ';'. -// reference local 12 -// diagnostic Error: -// > Expected an identifier. // ^^^^^^^^ reference scip-dart pub dart3_features 1.0.0 lib/`main.dart`/userInfo(). print('User $name is $height cm tall.'); -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). -// ^^^^ reference local 13 -// diagnostic Error: -// > The non-nullable local variable 'name' must be assigned before it can be used. +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). +// ^^^^ reference local 12 +// ^^^^^^ reference local 13 final json = {'name': 'Michael', 'height': 180}; -// ^^^^ definition local 15 +// ^^^^ definition local 14 // documentation // > ```dart // > Map json // > ``` if (json case {'name': 'Michael', 'height': int h}) { -// ^^^^ reference local 15 -// diagnostic Error: -// > Conditions must have a static type of 'bool'. +// ^^^^ reference local 14 +// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# print('Michael is $h cm tall.'); -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). +// ^ reference local 15 } } @@ -263,27 +217,27 @@ // ^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/Foo# // documentation // > ```dart -// > class Foo +// > base class Foo // > ``` final class Bar {} // ^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/Bar# // documentation // > ```dart -// > class Bar +// > final class Bar // > ``` interface class Car {} // ^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/Car# // documentation // > ```dart -// > class Car +// > interface class Car // > ``` sealed class Zar {} // ^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/Zar# // documentation // > ```dart -// > class Zar +// > sealed class Zar // > ``` diff --git a/snapshots/output/dart3-features/3.1.0/lib/main.dart b/snapshots/output/dart3-features/3.1.0/lib/main.dart new file mode 100755 index 00000000..f9e7ade0 --- /dev/null +++ b/snapshots/output/dart3-features/3.1.0/lib/main.dart @@ -0,0 +1,243 @@ + (String, int) userInfo(Map json) { +// definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/ +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# +// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# +// ^^^^^^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/userInfo(). +// documentation +// > ```dart +// > (String, int) userInfo(Map json) +// > ``` +// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`map.dart`/Map# +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# +// ^^^^ definition local 0 +// documentation +// > ```dart +// > Map json +// > ``` + return (json['name'] as String, json['height'] as int); +// ^^^^ reference local 0 +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# +// ^^^^ reference local 0 +// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# + } + + void parser(int charCode) { +// ^^^^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/parser(). +// documentation +// > ```dart +// > void parser(int charCode) +// > ``` +// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# +// ^^^^^^^^ definition local 1 +// documentation +// > ```dart +// > int charCode +// > ``` + const slash = 1; +// ^^^^^ definition local 2 +// documentation +// > ```dart +// > int slash +// > ``` + const star = 2; +// ^^^^ definition local 3 +// documentation +// > ```dart +// > int star +// > ``` + const plus = 3; +// ^^^^ definition local 4 +// documentation +// > ```dart +// > int plus +// > ``` + const minus = 4; +// ^^^^^ definition local 5 +// documentation +// > ```dart +// > int minus +// > ``` + + final nextCharCode = 'a'; +// ^^^^^^^^^^^^ definition local 6 +// documentation +// > ```dart +// > String nextCharCode +// > ``` + const digit0 = 0; +// ^^^^^^ definition local 7 +// documentation +// > ```dart +// > int digit0 +// > ``` + const digit9 = 9; +// ^^^^^^ definition local 8 +// documentation +// > ```dart +// > int digit9 +// > ``` + + void skipComment() {} +// ^^^^^^^^^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/skipComment(). +// documentation +// > ```dart +// > void skipComment() +// > ``` + void operatorFn(int charCode) {} +// ^^^^^^^^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/operatorFn(). +// documentation +// > ```dart +// > void operatorFn(int charCode) +// > ``` +// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# +// ^^^^^^^^ definition local 9 +// documentation +// > ```dart +// > int charCode +// > ``` + void number() {} +// ^^^^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/number(). +// documentation +// > ```dart +// > void number() +// > ``` + void invalid() {} +// ^^^^^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/invalid(). +// documentation +// > ```dart +// > void invalid() +// > ``` + + switch (charCode) { +// ^^^^^^^^ reference local 1 + case slash when nextCharCode == slash: +// ^^^^^ reference local 2 +// ^^^^^^^^^^^^ reference local 6 +// ^^^^^ reference local 2 + skipComment(); +// ^^^^^^^^^^^ reference scip-dart pub dart3_features 1.0.0 lib/`main.dart`/skipComment(). + + case slash || star || plus || minus: +// ^^^^^ reference local 2 +// ^^^^ reference local 3 +// ^^^^ reference local 4 +// ^^^^^ reference local 5 + operatorFn(charCode); +// ^^^^^^^^^^ reference scip-dart pub dart3_features 1.0.0 lib/`main.dart`/operatorFn(). +// ^^^^^^^^ reference local 1 + + case >= digit0 && <= digit9: +// ^^^^^^ reference local 7 +// ^^^^^^ reference local 8 + number(); +// ^^^^^^ reference scip-dart pub dart3_features 1.0.0 lib/`main.dart`/number(). + + default: + invalid(); +// ^^^^^^^ reference scip-dart pub dart3_features 1.0.0 lib/`main.dart`/invalid(). + } + } + + const six = 6; +// ^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/six. +// documentation +// > ```dart +// > int six +// > ``` + const msg = 'Feeling the Monday blues?'; +// ^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/msg. +// documentation +// > ```dart +// > String msg +// > ``` + String describeDate(DateTime dt) { +//^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# +// ^^^^^^^^^^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/describeDate(). +// documentation +// > ```dart +// > String describeDate(DateTime dt) +// > ``` +// ^^^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`date_time.dart`/DateTime# +// ^^ definition local 10 +// documentation +// > ```dart +// > DateTime dt +// > ``` + const one = 1; +// ^^^ definition local 11 +// documentation +// > ```dart +// > int one +// > ``` + return switch (dt.weekday) { +// ^^ reference local 10 +// ^^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`date_time.dart`/DateTime#weekday. + one => 'Feeling the Monday blues?', +// ^^^ reference local 11 + 7 || six => 'Enjoy the weekend!', +// ^^^ reference scip-dart pub dart3_features 1.0.0 lib/`main.dart`/six. + _ => 'Hang in there.' + }; + } + + void main() { +// ^^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/main(). +// documentation +// > ```dart +// > void main() +// > ``` + var ( + String name, +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# + int height, +// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# + ) = userInfo({'name': 'Michael', 'height': 180}); +// ^^^^^^^^ reference scip-dart pub dart3_features 1.0.0 lib/`main.dart`/userInfo(). + print('User $name is $height cm tall.'); +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). +// ^^^^ reference local 12 +// ^^^^^^ reference local 13 + + final json = {'name': 'Michael', 'height': 180}; +// ^^^^ definition local 14 +// documentation +// > ```dart +// > Map json +// > ``` + if (json case {'name': 'Michael', 'height': int h}) { +// ^^^^ reference local 14 +// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# + print('Michael is $h cm tall.'); +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). +// ^ reference local 15 + } + } + + base class Foo {} +// ^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/Foo# +// documentation +// > ```dart +// > base class Foo +// > ``` + + final class Bar {} +// ^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/Bar# +// documentation +// > ```dart +// > final class Bar +// > ``` + + interface class Car {} +// ^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/Car# +// documentation +// > ```dart +// > interface class Car +// > ``` + + sealed class Zar {} +// ^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/Zar# +// documentation +// > ```dart +// > sealed class Zar +// > ``` + diff --git a/snapshots/output/diagnostics/lib/main.dart b/snapshots/output/diagnostics/2.19.6/lib/main.dart similarity index 85% rename from snapshots/output/diagnostics/lib/main.dart rename to snapshots/output/diagnostics/2.19.6/lib/main.dart index d49fda0a..85ac8cb1 100755 --- a/snapshots/output/diagnostics/lib/main.dart +++ b/snapshots/output/diagnostics/2.19.6/lib/main.dart @@ -20,7 +20,7 @@ // > The declaration '_unusedMethod' isn't referenced. String _unusedTopLevelVariable = 'asdf'; -//^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +//^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# // ^^^^^^^^^^^^^^^^^^^^^^^ definition local 2 // documentation // > ```dart @@ -30,7 +30,7 @@ // > The declaration '_unusedTopLevelVariable' isn't referenced. @Deprecated('This method is deprecated') -// ^^^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`annotations.dart`/Deprecated# +// ^^^^^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`annotations.dart`/Deprecated# void deprecatedMethod() {} // ^^^^^^^^^^^^^^^^ definition scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/deprecatedMethod(). // documentation @@ -45,7 +45,7 @@ // > void deprecatedParam({dynamic foobar}) // > ``` @Deprecated('this param is deprecated') dynamic foobar -// ^^^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`annotations.dart`/Deprecated# +// ^^^^^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`annotations.dart`/Deprecated# // ^^^^^^ definition scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/deprecatedParam().(foobar) // documentation // > ```dart @@ -65,23 +65,23 @@ // > ```dart // > String unusedVariable // > ``` -// diagnostic Information: +// diagnostic Warning: // > The value of the local variable 'unusedVariable' isn't used. String variableWithUnecssaryDeclaration = 'asdf'; -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ definition local 4 // documentation // > ```dart // > String variableWithUnecssaryDeclaration // > ``` -// diagnostic Information: +// diagnostic Warning: // > The value of the local variable 'variableWithUnecssaryDeclaration' isn't used. // dead_code example if (true) { } else { print('This condition is never met!'); -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). } deprecatedMethod(); @@ -96,7 +96,7 @@ } @deprecated -// ^^^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`annotations.dart`/deprecated. +// ^^^^^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`annotations.dart`/deprecated. void someDeprecatedFunc() {} // ^^^^^^^^^^^^^^^^^^ definition scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/someDeprecatedFunc(). // documentation diff --git a/snapshots/output/diagnostics/3.1.0/lib/main.dart b/snapshots/output/diagnostics/3.1.0/lib/main.dart new file mode 100755 index 00000000..85ac8cb1 --- /dev/null +++ b/snapshots/output/diagnostics/3.1.0/lib/main.dart @@ -0,0 +1,105 @@ + import 'dart:collection'; // unused import +// definition scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/ + + class _UnusedClass {} +// ^^^^^^^^^^^^ definition local 0 +// documentation +// > ```dart +// > class _UnusedClass +// > ``` +// diagnostic Information: +// > The declaration '_UnusedClass' isn't referenced. + + void _unusedMethod() {} +// ^^^^^^^^^^^^^ definition local 1 +// documentation +// > ```dart +// > void _unusedMethod() +// > ``` +// diagnostic Information: +// > The declaration '_unusedMethod' isn't referenced. + + String _unusedTopLevelVariable = 'asdf'; +//^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# +// ^^^^^^^^^^^^^^^^^^^^^^^ definition local 2 +// documentation +// > ```dart +// > String _unusedTopLevelVariable +// > ``` +// diagnostic Information: +// > The declaration '_unusedTopLevelVariable' isn't referenced. + + @Deprecated('This method is deprecated') +// ^^^^^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`annotations.dart`/Deprecated# + void deprecatedMethod() {} +// ^^^^^^^^^^^^^^^^ definition scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/deprecatedMethod(). +// documentation +// > ```dart +// > void deprecatedMethod() +// > ``` + + void deprecatedParam({ +// ^^^^^^^^^^^^^^^ definition scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/deprecatedParam(). +// documentation +// > ```dart +// > void deprecatedParam({dynamic foobar}) +// > ``` + @Deprecated('this param is deprecated') dynamic foobar +// ^^^^^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`annotations.dart`/Deprecated# +// ^^^^^^ definition scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/deprecatedParam().(foobar) +// documentation +// > ```dart +// > {dynamic foobar} +// > ``` + }) {} + + void main() { +// ^^^^ definition scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/main(). +// documentation +// > ```dart +// > void main() +// > ``` + final unusedVariable = 'asdf'; +// ^^^^^^^^^^^^^^ definition local 3 +// documentation +// > ```dart +// > String unusedVariable +// > ``` +// diagnostic Warning: +// > The value of the local variable 'unusedVariable' isn't used. + + String variableWithUnecssaryDeclaration = 'asdf'; +// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ definition local 4 +// documentation +// > ```dart +// > String variableWithUnecssaryDeclaration +// > ``` +// diagnostic Warning: +// > The value of the local variable 'variableWithUnecssaryDeclaration' isn't used. + + // dead_code example + if (true) { } else { + print('This condition is never met!'); +// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). + } + + deprecatedMethod(); +// ^^^^^^^^^^^^^^^^ reference scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/deprecatedMethod(). +// diagnostic Information: +// > 'deprecatedMethod' is deprecated and shouldn't be used. This method is deprecated. + deprecatedParam(foobar: 2); +// ^^^^^^^^^^^^^^^ reference scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/deprecatedParam(). +// ^^^^^^ reference scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/deprecatedParam().(foobar) +// diagnostic Information: +// > 'foobar' is deprecated and shouldn't be used. this param is deprecated. + } + + @deprecated +// ^^^^^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`annotations.dart`/deprecated. + void someDeprecatedFunc() {} +// ^^^^^^^^^^^^^^^^^^ definition scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/someDeprecatedFunc(). +// documentation +// > ```dart +// > void someDeprecatedFunc() +// > ``` diff --git a/tool/regen-snapshots.sh b/tool/regen-snapshots.sh new file mode 100755 index 00000000..1f13c699 --- /dev/null +++ b/tool/regen-snapshots.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# DART_VERSION=$(dart --version | grep -o '[0-9]*\.[0-9]*\.[0-9]*' | awk 'NR==1') + +DART_VERSIONS=("2.19.6" "3.1.0") + +PROJECTS=( + basic-project + dart3-features + diagnostics +) + +for dart_version in "${DART_VERSIONS[@]}"; do + asdf global dart "$dart_version" + for project in "${PROJECTS[@]}"; do + dart pub upgrade + dart run scip_dart "./snapshots/input/$project" + scip snapshot --to "./snapshots/output/$project/$dart_version" + done +done \ No newline at end of file From 7687a7c4d132651c9e2fb3799ec993f77ecbca67 Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Sun, 28 Jan 2024 16:39:01 -0700 Subject: [PATCH 05/16] feat --- snapshots/input/dart3-features/.tool-versions | 1 - snapshots/input/dart3-features/pubspec.yaml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) delete mode 100644 snapshots/input/dart3-features/.tool-versions diff --git a/snapshots/input/dart3-features/.tool-versions b/snapshots/input/dart3-features/.tool-versions deleted file mode 100644 index 07772a00..00000000 --- a/snapshots/input/dart3-features/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -dart 3.1.0 diff --git a/snapshots/input/dart3-features/pubspec.yaml b/snapshots/input/dart3-features/pubspec.yaml index a61ac8bc..96c1a8c6 100644 --- a/snapshots/input/dart3-features/pubspec.yaml +++ b/snapshots/input/dart3-features/pubspec.yaml @@ -2,4 +2,4 @@ name: dart3_features version: 1.0.0 environment: - sdk: ">=3.0.0 <4.0.0" \ No newline at end of file + sdk: ">=2.19.6 <4.0.0" \ No newline at end of file From f2e58946b0c0715d200a840f7303fe4437dda146 Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Sun, 28 Jan 2024 16:41:08 -0700 Subject: [PATCH 06/16] updated diff --- .github/workflows/tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index f0919291..9c47a195 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -42,7 +42,7 @@ jobs: else echo echo "Snapshot diff detected differences, run 'make regen-snapshots' to re-generate snapshots" - git status --short ./snapshots/output + git diff ./snapshots/output echo exit 1 fi From a815d2a6a87928c09510b4bf97fa4286704b2992 Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Sun, 28 Jan 2024 16:41:28 -0700 Subject: [PATCH 07/16] nopager --- .github/workflows/tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 9c47a195..85009677 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -42,7 +42,7 @@ jobs: else echo echo "Snapshot diff detected differences, run 'make regen-snapshots' to re-generate snapshots" - git diff ./snapshots/output + git --no-pager diff ./snapshots/output echo exit 1 fi From 0925930c393a01eef666d782ef772c02c9efffc6 Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Sun, 28 Jan 2024 16:46:53 -0700 Subject: [PATCH 08/16] regen --- .github/workflows/tests.yaml | 1 + pubspec.lock | 54 +++++++++---------- .../output/basic-project/2.19.6/lib/main.dart | 14 ++--- .../output/basic-project/2.19.6/lib/more.dart | 52 +++++++++--------- .../basic-project/2.19.6/lib/other.dart | 14 ++--- .../2.19.6/lib/relationships.dart | 14 ++--- .../dart3-features/2.19.6/lib/main.dart | 32 +++++------ .../output/diagnostics/2.19.6/lib/main.dart | 12 ++--- tool/regen-snapshots.sh | 16 +++--- 9 files changed, 104 insertions(+), 105 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 85009677..534703b4 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -11,6 +11,7 @@ jobs: snapshots: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: sdk: [2.19.6, 3.1.0] dir: [basic-project, diagnostics, dart3-features] diff --git a/pubspec.lock b/pubspec.lock index c530529d..f11336a5 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -45,10 +45,10 @@ packages: dependency: transitive description: name: build - sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" + sha256: "3fbda25365741f8251b39f3917fb3c8e286a96fd068a5a242e11c2012d495777" url: "https://pub.dev" source: hosted - version: "2.4.1" + version: "2.3.1" build_config: dependency: transitive description: @@ -61,34 +61,34 @@ packages: dependency: transitive description: name: build_daemon - sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" + sha256: "757153e5d9cd88253cb13f28c2fb55a537dc31fefd98137549895b5beb7c6169" url: "https://pub.dev" source: hosted - version: "4.0.1" + version: "3.1.1" build_resolvers: dependency: transitive description: name: build_resolvers - sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" + sha256: "0713a05b0386bd97f9e63e78108805a4feca5898a4b821d6610857f10c91e975" url: "https://pub.dev" source: hosted - version: "2.4.2" + version: "2.4.0" build_runner: dependency: transitive description: name: build_runner - sha256: "581bacf68f89ec8792f5e5a0b2c4decd1c948e97ce659dc783688c8a88fbec21" + sha256: b0a8a7b8a76c493e85f1b84bffa0588859a06197863dba8c9036b15581fd9727 url: "https://pub.dev" source: hosted - version: "2.4.8" + version: "2.3.3" build_runner_core: dependency: transitive description: name: build_runner_core - sha256: c9e32d21dd6626b5c163d48b037ce906bbe428bc23ab77bcd77bb21e593b6185 + sha256: "0671ad4162ed510b70d0eb4ad6354c249f8429cab4ae7a4cec86bbc2886eb76e" url: "https://pub.dev" source: hosted - version: "7.2.11" + version: "7.2.7+1" built_collection: dependency: transitive description: @@ -101,10 +101,10 @@ packages: dependency: transitive description: name: built_value - sha256: a3ec2e0f967bc47f69f95009bb93db936288d61d5343b9436e378b28a2f830c6 + sha256: "69acb7007eb2a31dc901512bfe0f7b767168be34cb734835d54c070bfa74c1b2" url: "https://pub.dev" source: hosted - version: "8.9.0" + version: "8.8.0" chalk: dependency: "direct dev" description: @@ -125,10 +125,10 @@ packages: dependency: transitive description: name: code_builder - sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 + sha256: "1be9be30396d7e4c0db42c35ea6ccd7cc6a1e19916b5dc64d6ac216b5544d677" url: "https://pub.dev" source: hosted - version: "4.10.0" + version: "4.7.0" collection: dependency: transitive description: @@ -181,10 +181,10 @@ packages: dependency: transitive description: name: file - sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" url: "https://pub.dev" source: hosted - version: "7.0.0" + version: "6.1.4" fixnum: dependency: transitive description: @@ -245,10 +245,10 @@ packages: dependency: transitive description: name: js - sha256: "4186c61b32f99e60f011f7160e32c89a758ae9b1d0c6d28e2c02ef0382300e2b" + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 url: "https://pub.dev" source: hosted - version: "0.7.0" + version: "0.6.7" json_annotation: dependency: transitive description: @@ -269,10 +269,10 @@ packages: dependency: transitive description: name: matcher - sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" url: "https://pub.dev" source: hosted - version: "0.12.16+1" + version: "0.12.16" meta: dependency: transitive description: @@ -301,10 +301,10 @@ packages: dependency: "direct main" description: name: path - sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" url: "https://pub.dev" source: hosted - version: "1.9.0" + version: "1.8.3" pool: dependency: transitive description: @@ -405,10 +405,10 @@ packages: dependency: transitive description: name: test_api - sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" + sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" url: "https://pub.dev" source: hosted - version: "0.7.0" + version: "0.6.0" timing: dependency: transitive description: @@ -429,10 +429,10 @@ packages: dependency: transitive description: name: watcher - sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + sha256: "6a7f46926b01ce81bfc339da6a7f20afbe7733eff9846f6d6a5466aa4c6667c0" url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.0.2" web_socket_channel: dependency: transitive description: @@ -458,4 +458,4 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.1.0-66.0.dev <4.0.0" + dart: ">=2.19.6 <3.0.0" diff --git a/snapshots/output/basic-project/2.19.6/lib/main.dart b/snapshots/output/basic-project/2.19.6/lib/main.dart index cdfbda25..cdaed412 100755 --- a/snapshots/output/basic-project/2.19.6/lib/main.dart +++ b/snapshots/output/basic-project/2.19.6/lib/main.dart @@ -6,7 +6,7 @@ /// Takes a number /// Returns a number int fib(int n) { -//^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# +//^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# // ^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/fib(). // documentation // > ```dart @@ -16,7 +16,7 @@ // > This is a fib function // > Takes a number // > Returns a number -// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# +// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# // ^ definition local 0 // documentation // > ```dart @@ -37,14 +37,14 @@ // > ```dart // > void print_fib(int a) // > ``` -// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# +// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# // ^ definition local 1 // documentation // > ```dart // > int a // > ``` print(fib(a)); -// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). // ^^^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/fib(). // ^ reference local 1 } @@ -56,7 +56,7 @@ // > String y // > ``` String capture() { -//^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# +//^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# // ^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/capture(). // documentation // > ```dart @@ -96,7 +96,7 @@ // > int i // > ``` print(i); -// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). // ^ reference local 3 } @@ -148,7 +148,7 @@ // > Reference class: [SomeLocalClass] // > Reference external class: [Foo] // > Missing Reference: [IDontExist] -// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# +// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# // ^^^^^ definition local 5 // documentation // > ```dart diff --git a/snapshots/output/basic-project/2.19.6/lib/more.dart b/snapshots/output/basic-project/2.19.6/lib/more.dart index 016d705a..9857ba25 100755 --- a/snapshots/output/basic-project/2.19.6/lib/more.dart +++ b/snapshots/output/basic-project/2.19.6/lib/more.dart @@ -52,7 +52,7 @@ // > void sleep() // > ``` print('zzz...'); -// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). } } @@ -65,7 +65,7 @@ // relationship scip-dart pub dart_test 1.0.0 lib/`more.dart`/SleepMixin# implementation // ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/SleepMixin# String name; -// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# // ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#name. // documentation // > ```dart @@ -112,26 +112,26 @@ // ^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#cat. soundMaker = () => print('Meow!'); // ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#soundMaker. -// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). break; case AnimalType.dog: // ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# // ^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#dog. soundMaker = () => print('Woof!'); // ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#soundMaker. -// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). break; case AnimalType.bird: // ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# // ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#bird. soundMaker = () => print('Chirp!'); // ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#soundMaker. -// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). break; default: soundMaker = () => print('Unknown animal type'); // ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#soundMaker. -// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). } } @@ -146,15 +146,15 @@ } @override -// ^^^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`annotations.dart`/override. +// ^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`annotations.dart`/override. String toString() { -// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# // ^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#toString(). // documentation // > ```dart // > String toString() // > ``` -// relationship scip-dart pub dart:core 3.1.0 dart:core/`object.dart`/Object#toString(). implementation reference +// relationship scip-dart pub dart:core 2.19.0 dart:core/`object.dart`/Object#toString(). implementation reference return '$name the $type'; // ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#name. // ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#type. @@ -162,14 +162,14 @@ } int calculateSum(List numbers) { -//^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# +//^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# // ^^^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/calculateSum(). // documentation // > ```dart // > int calculateSum(List numbers) // > ``` -// ^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`list.dart`/List# -// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# +// ^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`list.dart`/List# +// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# // ^^^^^^^ definition local 1 // documentation // > ```dart @@ -177,7 +177,7 @@ // > ``` return numbers.reduce((value, element) => value + element); // ^^^^^^^ reference local 1 -// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`iterable.dart`/Iterable#reduce(). +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`iterable.dart`/Iterable#reduce(). // ^^^^^ definition local 2 // documentation // > ```dart @@ -199,15 +199,15 @@ // > void main() // > ``` List numbers = [1, 2, 3, 4, 5]; -// ^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`list.dart`/List# -// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# +// ^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`list.dart`/List# +// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# // ^^^^^^^ definition local 4 // documentation // > ```dart // > List numbers // > ``` int sum = calculateSum(numbers); -// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# +// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# // ^^^ definition local 5 // documentation // > ```dart @@ -254,23 +254,23 @@ // ^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/SleepMixin#sleep(). print(cat); -// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). // ^^^ reference local 6 print(dog); -// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). // ^^^ reference local 7 print('The sum of $numbers is $sum'); -// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). // ^^^^^^^ reference local 4 // ^^^ reference local 5 print(math.Rectangle(1,2,3,4)); -// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). // ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/math. -// ^^^^^^^^^ reference scip-dart pub dart:math 3.1.0 dart:math/`rectangle.dart`/Rectangle# +// ^^^^^^^^^ reference scip-dart pub dart:math 2.19.0 dart:math/`rectangle.dart`/Rectangle# [1,2].reduce((a, b) => a + b); -// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`iterable.dart`/Iterable#reduce(). +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`iterable.dart`/Iterable#reduce(). // ^ definition local 8 // documentation // > ```dart @@ -291,8 +291,8 @@ // > ```dart // > void test(String Function(int) p) // > ``` -// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# -// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# // ^ definition local 10 // documentation // > ```dart @@ -304,8 +304,8 @@ // > ```dart // > void deepTest(String Function(void Function(String)) p) // > ``` -// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# -// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# // ^ definition local 11 // documentation // > ```dart diff --git a/snapshots/output/basic-project/2.19.6/lib/other.dart b/snapshots/output/basic-project/2.19.6/lib/other.dart index 50c122d6..da91268d 100755 --- a/snapshots/output/basic-project/2.19.6/lib/other.dart +++ b/snapshots/output/basic-project/2.19.6/lib/other.dart @@ -13,7 +13,7 @@ // > class Foo // > ``` int _far; -// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# +// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# // ^^^^ definition local 0 // documentation // > ```dart @@ -22,21 +22,21 @@ // diagnostic Warning: // > The value of the field '_far' isn't used. bool value; -// ^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`bool.dart`/bool# +// ^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`bool.dart`/bool# // ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value. // documentation // > ```dart // > bool value // > ``` String value2; -// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# // ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value2. // documentation // > ```dart // > String value2 // > ``` double value3; -// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`double.dart`/double# +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`double.dart`/double# // ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value3. // documentation // > ```dart @@ -76,7 +76,7 @@ // > class Bar // > ``` String _someValue; -// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# // ^^^^^^^^^^ definition local 2 // documentation // > ```dart @@ -105,7 +105,7 @@ _someValue = 'asdf'; // ^^^^^^^^^^ reference local 2 print(_someValue); -// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). // ^^^^^^^^^^ reference local 2 } } @@ -118,7 +118,7 @@ // > ``` more.loadLibrary().then((_) => { // ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/more. -// ^^^^ reference scip-dart pub dart:async 3.1.0 dart:async/`future.dart`/Future#then(). +// ^^^^ reference scip-dart pub dart:async 2.19.0 dart:async/`future.dart`/Future#then(). // ^ definition local 4 // documentation // > ```dart diff --git a/snapshots/output/basic-project/2.19.6/lib/relationships.dart b/snapshots/output/basic-project/2.19.6/lib/relationships.dart index 3152f9d7..174afc43 100755 --- a/snapshots/output/basic-project/2.19.6/lib/relationships.dart +++ b/snapshots/output/basic-project/2.19.6/lib/relationships.dart @@ -6,7 +6,7 @@ // > abstract class Mammal // > ``` String get hierarchy; -// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# // ^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal#hierarchy. // documentation // > ```dart @@ -23,7 +23,7 @@ // relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal# implementation // ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal# String sound() => 'NOISE!'; -// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# // ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal#sound(). // documentation // > ```dart @@ -43,7 +43,7 @@ // > ```dart // > void execute() // > ``` -// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). } class Dog extends Animal with SwimAction { @@ -58,9 +58,9 @@ // ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal# // ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/SwimAction# @override -// ^^^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`annotations.dart`/override. +// ^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`annotations.dart`/override. String sound() => 'woof'; -// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# // ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Dog#sound(). // documentation // > ```dart @@ -69,9 +69,9 @@ // relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal#sound(). implementation reference @override -// ^^^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`annotations.dart`/override. +// ^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`annotations.dart`/override. String get hierarchy => 'dog.animal.mammal'; -// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# // ^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Dog#hierarchy. // documentation // > ```dart diff --git a/snapshots/output/dart3-features/2.19.6/lib/main.dart b/snapshots/output/dart3-features/2.19.6/lib/main.dart index f9e7ade0..b3cfabf8 100755 --- a/snapshots/output/dart3-features/2.19.6/lib/main.dart +++ b/snapshots/output/dart3-features/2.19.6/lib/main.dart @@ -1,14 +1,14 @@ (String, int) userInfo(Map json) { // definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/ -// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# -// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# // ^^^^^^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/userInfo(). // documentation // > ```dart // > (String, int) userInfo(Map json) // > ``` -// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`map.dart`/Map# -// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# +// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`map.dart`/Map# +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# // ^^^^ definition local 0 // documentation // > ```dart @@ -16,9 +16,9 @@ // > ``` return (json['name'] as String, json['height'] as int); // ^^^^ reference local 0 -// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# // ^^^^ reference local 0 -// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# +// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# } void parser(int charCode) { @@ -27,7 +27,7 @@ // > ```dart // > void parser(int charCode) // > ``` -// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# +// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# // ^^^^^^^^ definition local 1 // documentation // > ```dart @@ -89,7 +89,7 @@ // > ```dart // > void operatorFn(int charCode) // > ``` -// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# +// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# // ^^^^^^^^ definition local 9 // documentation // > ```dart @@ -151,13 +151,13 @@ // > String msg // > ``` String describeDate(DateTime dt) { -//^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# +//^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# // ^^^^^^^^^^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/describeDate(). // documentation // > ```dart // > String describeDate(DateTime dt) // > ``` -// ^^^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`date_time.dart`/DateTime# +// ^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`date_time.dart`/DateTime# // ^^ definition local 10 // documentation // > ```dart @@ -171,7 +171,7 @@ // > ``` return switch (dt.weekday) { // ^^ reference local 10 -// ^^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`date_time.dart`/DateTime#weekday. +// ^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`date_time.dart`/DateTime#weekday. one => 'Feeling the Monday blues?', // ^^^ reference local 11 7 || six => 'Enjoy the weekend!', @@ -188,13 +188,13 @@ // > ``` var ( String name, -// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# int height, -// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# +// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# ) = userInfo({'name': 'Michael', 'height': 180}); // ^^^^^^^^ reference scip-dart pub dart3_features 1.0.0 lib/`main.dart`/userInfo(). print('User $name is $height cm tall.'); -// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). // ^^^^ reference local 12 // ^^^^^^ reference local 13 @@ -206,9 +206,9 @@ // > ``` if (json case {'name': 'Michael', 'height': int h}) { // ^^^^ reference local 14 -// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# +// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# print('Michael is $h cm tall.'); -// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). // ^ reference local 15 } } diff --git a/snapshots/output/diagnostics/2.19.6/lib/main.dart b/snapshots/output/diagnostics/2.19.6/lib/main.dart index 85ac8cb1..06995106 100755 --- a/snapshots/output/diagnostics/2.19.6/lib/main.dart +++ b/snapshots/output/diagnostics/2.19.6/lib/main.dart @@ -20,7 +20,7 @@ // > The declaration '_unusedMethod' isn't referenced. String _unusedTopLevelVariable = 'asdf'; -//^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# +//^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# // ^^^^^^^^^^^^^^^^^^^^^^^ definition local 2 // documentation // > ```dart @@ -30,7 +30,7 @@ // > The declaration '_unusedTopLevelVariable' isn't referenced. @Deprecated('This method is deprecated') -// ^^^^^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`annotations.dart`/Deprecated# +// ^^^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`annotations.dart`/Deprecated# void deprecatedMethod() {} // ^^^^^^^^^^^^^^^^ definition scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/deprecatedMethod(). // documentation @@ -45,7 +45,7 @@ // > void deprecatedParam({dynamic foobar}) // > ``` @Deprecated('this param is deprecated') dynamic foobar -// ^^^^^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`annotations.dart`/Deprecated# +// ^^^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`annotations.dart`/Deprecated# // ^^^^^^ definition scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/deprecatedParam().(foobar) // documentation // > ```dart @@ -69,7 +69,7 @@ // > The value of the local variable 'unusedVariable' isn't used. String variableWithUnecssaryDeclaration = 'asdf'; -// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ definition local 4 // documentation // > ```dart @@ -81,7 +81,7 @@ // dead_code example if (true) { } else { print('This condition is never met!'); -// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). } deprecatedMethod(); @@ -96,7 +96,7 @@ } @deprecated -// ^^^^^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`annotations.dart`/deprecated. +// ^^^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`annotations.dart`/deprecated. void someDeprecatedFunc() {} // ^^^^^^^^^^^^^^^^^^ definition scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/someDeprecatedFunc(). // documentation diff --git a/tool/regen-snapshots.sh b/tool/regen-snapshots.sh index 1f13c699..92ced581 100755 --- a/tool/regen-snapshots.sh +++ b/tool/regen-snapshots.sh @@ -1,8 +1,9 @@ #!/bin/bash -# DART_VERSION=$(dart --version | grep -o '[0-9]*\.[0-9]*\.[0-9]*' | awk 'NR==1') +dart --version + +DART_VERSION=$(dart --version | grep -o '[0-9]*\.[0-9]*\.[0-9]*' | awk 'NR==1') -DART_VERSIONS=("2.19.6" "3.1.0") PROJECTS=( basic-project @@ -10,11 +11,8 @@ PROJECTS=( diagnostics ) -for dart_version in "${DART_VERSIONS[@]}"; do - asdf global dart "$dart_version" - for project in "${PROJECTS[@]}"; do - dart pub upgrade - dart run scip_dart "./snapshots/input/$project" - scip snapshot --to "./snapshots/output/$project/$dart_version" - done +for project in "${PROJECTS[@]}"; do + dart pub upgrade + dart run scip_dart "./snapshots/input/$project" + scip snapshot --to "./snapshots/output/$project/$DART_VERSION" done \ No newline at end of file From 730ba66a7c67ffb7fb75ee26543d307ae363cfb2 Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Sun, 28 Jan 2024 16:51:06 -0700 Subject: [PATCH 09/16] not multi sdk snaps --- .github/workflows/tests.yaml | 9 +- snapshots/input/dart3-features/pubspec.lock | 2 +- .../output/basic-project/3.1.0/lib/main.dart | 159 --------- .../output/basic-project/3.1.0/lib/more.dart | 313 ------------------ .../output/basic-project/3.1.0/lib/other.dart | 151 --------- .../3.1.0/lib/relationships.dart | 81 ----- .../basic-project/3.1.0/test/basic_test.dart | 18 - .../basic-project/{2.19.6 => }/lib/main.dart | 0 .../basic-project/{2.19.6 => }/lib/more.dart | 0 .../basic-project/{2.19.6 => }/lib/other.dart | 0 .../{2.19.6 => }/lib/relationships.dart | 0 .../{2.19.6 => }/test/basic_test.dart | 0 .../output/dart3-features/3.1.0/lib/main.dart | 243 -------------- .../dart3-features/{2.19.6 => }/lib/main.dart | 76 ++++- .../output/diagnostics/3.1.0/lib/main.dart | 105 ------ .../diagnostics/{2.19.6 => }/lib/main.dart | 0 tool/regen-snapshots.sh | 7 +- 17 files changed, 69 insertions(+), 1095 deletions(-) delete mode 100755 snapshots/output/basic-project/3.1.0/lib/main.dart delete mode 100755 snapshots/output/basic-project/3.1.0/lib/more.dart delete mode 100755 snapshots/output/basic-project/3.1.0/lib/other.dart delete mode 100755 snapshots/output/basic-project/3.1.0/lib/relationships.dart delete mode 100755 snapshots/output/basic-project/3.1.0/test/basic_test.dart rename snapshots/output/basic-project/{2.19.6 => }/lib/main.dart (100%) rename snapshots/output/basic-project/{2.19.6 => }/lib/more.dart (100%) rename snapshots/output/basic-project/{2.19.6 => }/lib/other.dart (100%) rename snapshots/output/basic-project/{2.19.6 => }/lib/relationships.dart (100%) rename snapshots/output/basic-project/{2.19.6 => }/test/basic_test.dart (100%) delete mode 100755 snapshots/output/dart3-features/3.1.0/lib/main.dart rename snapshots/output/dart3-features/{2.19.6 => }/lib/main.dart (77%) delete mode 100755 snapshots/output/diagnostics/3.1.0/lib/main.dart rename snapshots/output/diagnostics/{2.19.6 => }/lib/main.dart (100%) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 534703b4..afcf4800 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -13,7 +13,6 @@ jobs: strategy: fail-fast: false matrix: - sdk: [2.19.6, 3.1.0] dir: [basic-project, diagnostics, dart3-features] steps: - uses: actions/checkout@v3 @@ -24,7 +23,7 @@ jobs: - uses: dart-lang/setup-dart@v1 with: - sdk: ${{ matrix.sdk }} + sdk: 2.19.6 - name: pub get scip-dart package run: dart pub get @@ -35,15 +34,15 @@ jobs: - name: Snapshots Diff Check run: | dart run scip_dart ./snapshots/input/${{ matrix.dir }} - ./scip snapshot --to ./snapshots/output/${{matrix.dir}}/${{matrix.sdk}} + ./scip snapshot --to ./snapshots/output/${{matrix.dir}} - if [[ -z "$(git status --porcelain ./snapshots/output)" ]]; + if [[ -z "$(git status --porcelain ./snapshots/output/${{ matrix.dir }})" ]]; then echo "No changes to snapshot files" else echo echo "Snapshot diff detected differences, run 'make regen-snapshots' to re-generate snapshots" - git --no-pager diff ./snapshots/output + git --no-pager diff ./snapshots/output/${{ matrix.dir }} echo exit 1 fi diff --git a/snapshots/input/dart3-features/pubspec.lock b/snapshots/input/dart3-features/pubspec.lock index 573410f7..752e1ef5 100644 --- a/snapshots/input/dart3-features/pubspec.lock +++ b/snapshots/input/dart3-features/pubspec.lock @@ -2,4 +2,4 @@ # See https://dart.dev/tools/pub/glossary#lockfile packages: {} sdks: - dart: ">=3.0.0 <4.0.0" + dart: ">=2.19.6 <4.0.0" diff --git a/snapshots/output/basic-project/3.1.0/lib/main.dart b/snapshots/output/basic-project/3.1.0/lib/main.dart deleted file mode 100755 index cdfbda25..00000000 --- a/snapshots/output/basic-project/3.1.0/lib/main.dart +++ /dev/null @@ -1,159 +0,0 @@ - import 'package:dart_test/other.dart'; -// definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/ - - /// This is a fib function - /// - /// Takes a number - /// Returns a number - int fib(int n) { -//^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# -// ^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/fib(). -// documentation -// > ```dart -// > int fib(int n) -// > ``` -// documentation -// > This is a fib function -// > Takes a number -// > Returns a number -// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# -// ^ definition local 0 -// documentation -// > ```dart -// > int n -// > ``` - if (n <= 1) return 0; -// ^ reference local 0 - return fib(n - 1) + fib(n - 2); -// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/fib(). -// ^ reference local 0 -// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/fib(). -// ^ reference local 0 - } - - void print_fib(int a) { -// ^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/print_fib(). -// documentation -// > ```dart -// > void print_fib(int a) -// > ``` -// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# -// ^ definition local 1 -// documentation -// > ```dart -// > int a -// > ``` - print(fib(a)); -// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). -// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/fib(). -// ^ reference local 1 - } - - final y = 'Hello'; -// ^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/y. -// documentation -// > ```dart -// > String y -// > ``` - String capture() { -//^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# -// ^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/capture(). -// documentation -// > ```dart -// > String capture() -// > ``` - return y; -// ^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/y. - } - - final capture_lambda = () => y; -// ^^^^^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/capture_lambda. -// documentation -// > ```dart -// > String Function() capture_lambda -// > ``` -// ^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/y. - - void main() { -// ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/main(). -// documentation -// > ```dart -// > void main() -// > ``` - for (var i = 0; i <= 10; i++) {} -// ^ definition local 2 -// documentation -// > ```dart -// > int i -// > ``` -// ^ reference local 2 -// ^ reference local 2 - - for (var i in [1, 2, 3]) { -// ^ definition local 3 -// documentation -// > ```dart -// > int i -// > ``` - print(i); -// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). -// ^ reference local 3 - } - - var a = 0; -// ^ definition local 4 -// documentation -// > ```dart -// > int a -// > ``` - a = 1; -// ^ reference local 4 - print_fib(a); -// ^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/print_fib(). -// ^ reference local 4 - } - - void forever() { -// ^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/forever(). -// documentation -// > ```dart -// > void forever() -// > ``` - return forever(); -// ^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/forever(). - } - - class SomeLocalClass {} -// ^^^^^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/SomeLocalClass# -// documentation -// > ```dart -// > class SomeLocalClass -// > ``` - - /// Reference parameter: [value] -// ^^^^^ reference local 5 - /// Reference class: [SomeLocalClass] -// ^^^^^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/SomeLocalClass# - /// Reference external class: [Foo] -// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo# - /// Missing Reference: [IDontExist] - void someFunction(int value) { -// ^^^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/someFunction(). -// documentation -// > ```dart -// > void someFunction(int value) -// > ``` -// documentation -// > Reference parameter: [value] -// > Reference class: [SomeLocalClass] -// > Reference external class: [Foo] -// > Missing Reference: [IDontExist] -// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# -// ^^^^^ definition local 5 -// documentation -// > ```dart -// > int value -// > ``` - Foo(1); -// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo# - } diff --git a/snapshots/output/basic-project/3.1.0/lib/more.dart b/snapshots/output/basic-project/3.1.0/lib/more.dart deleted file mode 100755 index 016d705a..00000000 --- a/snapshots/output/basic-project/3.1.0/lib/more.dart +++ /dev/null @@ -1,313 +0,0 @@ - import 'dart:math' as math; -// definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/ -// ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/math. -// documentation -// > ```dart -// > as math -// > ``` - - enum AnimalType { -// ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# -// documentation -// > ```dart -// > enum AnimalType -// > ``` - cat, -// ^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#cat. -// documentation -// > ```dart -// > AnimalType cat -// > ``` - dog, -// ^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#dog. -// documentation -// > ```dart -// > AnimalType dog -// > ``` - bird, -// ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#bird. -// documentation -// > ```dart -// > AnimalType bird -// > ``` - } - - typedef SoundMaker = void Function(); -// ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/SoundMaker# -// documentation -// > ```dart -// > typedef SoundMaker = void Function() -// > ``` - - mixin SleepMixin { -// ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/SleepMixin# -// documentation -// > ```dart -// > mixin SleepMixin on Object -// > ``` - void sleep() { -// ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/SleepMixin#sleep(). -// documentation -// > ```dart -// > void sleep() -// > ``` - print('zzz...'); -// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). - } - } - - class Animal with SleepMixin { -// ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal# -// documentation -// > ```dart -// > class Animal with SleepMixin -// > ``` -// relationship scip-dart pub dart_test 1.0.0 lib/`more.dart`/SleepMixin# implementation -// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/SleepMixin# - String name; -// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# -// ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#name. -// documentation -// > ```dart -// > String name -// > ``` - AnimalType type; -// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# -// ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#type. -// documentation -// > ```dart -// > AnimalType type -// > ``` - SoundMaker? soundMaker; -// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/SoundMaker# -// ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#soundMaker. -// documentation -// > ```dart -// > void Function() soundMaker -// > ``` - - Animal(this.name, {required this.type}) { -// ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#``(). -// documentation -// > ```dart -// > Animal Animal(String name, {required AnimalType type}) -// > ``` -// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal# -// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#name. -// ^^^^ definition local 0 -// documentation -// > ```dart -// > String name -// > ``` -// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#type. -// ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#``().(type) -// documentation -// > ```dart -// > {required AnimalType type} -// > ``` - switch (type) { -// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#type. - case AnimalType.cat: -// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# -// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#cat. - soundMaker = () => print('Meow!'); -// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#soundMaker. -// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). - break; - case AnimalType.dog: -// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# -// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#dog. - soundMaker = () => print('Woof!'); -// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#soundMaker. -// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). - break; - case AnimalType.bird: -// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# -// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#bird. - soundMaker = () => print('Chirp!'); -// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#soundMaker. -// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). - break; - default: - soundMaker = () => print('Unknown animal type'); -// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#soundMaker. -// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). - } - } - - void makeSound() { -// ^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#makeSound(). -// documentation -// > ```dart -// > void makeSound() -// > ``` - soundMaker?.call(); -// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#soundMaker. - } - - @override -// ^^^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`annotations.dart`/override. - String toString() { -// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# -// ^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#toString(). -// documentation -// > ```dart -// > String toString() -// > ``` -// relationship scip-dart pub dart:core 3.1.0 dart:core/`object.dart`/Object#toString(). implementation reference - return '$name the $type'; -// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#name. -// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#type. - } - } - - int calculateSum(List numbers) { -//^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# -// ^^^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/calculateSum(). -// documentation -// > ```dart -// > int calculateSum(List numbers) -// > ``` -// ^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`list.dart`/List# -// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# -// ^^^^^^^ definition local 1 -// documentation -// > ```dart -// > List numbers -// > ``` - return numbers.reduce((value, element) => value + element); -// ^^^^^^^ reference local 1 -// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`iterable.dart`/Iterable#reduce(). -// ^^^^^ definition local 2 -// documentation -// > ```dart -// > int value -// > ``` -// ^^^^^^^ definition local 3 -// documentation -// > ```dart -// > int element -// > ``` -// ^^^^^ reference local 2 -// ^^^^^^^ reference local 3 - } - - void main() { -// ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/main(). -// documentation -// > ```dart -// > void main() -// > ``` - List numbers = [1, 2, 3, 4, 5]; -// ^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`list.dart`/List# -// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# -// ^^^^^^^ definition local 4 -// documentation -// > ```dart -// > List numbers -// > ``` - int sum = calculateSum(numbers); -// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# -// ^^^ definition local 5 -// documentation -// > ```dart -// > int sum -// > ``` -// ^^^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/calculateSum(). -// ^^^^^^^ reference local 4 - - Animal cat = Animal('Kitty', type: AnimalType.cat); -// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal# -// ^^^ definition local 6 -// documentation -// > ```dart -// > Animal cat -// > ``` -// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal# -// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#``().(type) -// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# -// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#cat. - Animal dog = Animal('Buddy', type: AnimalType.dog); -// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal# -// ^^^ definition local 7 -// documentation -// > ```dart -// > Animal dog -// > ``` -// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal# -// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#``().(type) -// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# -// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#dog. - - cat.makeSound(); -// ^^^ reference local 6 -// ^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#makeSound(). - cat.sleep(); -// ^^^ reference local 6 -// ^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/SleepMixin#sleep(). - - dog.makeSound(); -// ^^^ reference local 7 -// ^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#makeSound(). - dog.sleep(); -// ^^^ reference local 7 -// ^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/SleepMixin#sleep(). - - print(cat); -// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). -// ^^^ reference local 6 - print(dog); -// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). -// ^^^ reference local 7 - print('The sum of $numbers is $sum'); -// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). -// ^^^^^^^ reference local 4 -// ^^^ reference local 5 - - print(math.Rectangle(1,2,3,4)); -// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). -// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/math. -// ^^^^^^^^^ reference scip-dart pub dart:math 3.1.0 dart:math/`rectangle.dart`/Rectangle# - - [1,2].reduce((a, b) => a + b); -// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`iterable.dart`/Iterable#reduce(). -// ^ definition local 8 -// documentation -// > ```dart -// > int a -// > ``` -// ^ definition local 9 -// documentation -// > ```dart -// > int b -// > ``` -// ^ reference local 8 -// ^ reference local 9 - } - - void test(String Function(int) p) {} -// ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/test(). -// documentation -// > ```dart -// > void test(String Function(int) p) -// > ``` -// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# -// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# -// ^ definition local 10 -// documentation -// > ```dart -// > String Function(int) p -// > ``` - void deepTest(String Function(void Function(String test)) p) {} -// ^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/deepTest(). -// documentation -// > ```dart -// > void deepTest(String Function(void Function(String)) p) -// > ``` -// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# -// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# -// ^ definition local 11 -// documentation -// > ```dart -// > String Function(void Function(String)) p -// > ``` diff --git a/snapshots/output/basic-project/3.1.0/lib/other.dart b/snapshots/output/basic-project/3.1.0/lib/other.dart deleted file mode 100755 index 50c122d6..00000000 --- a/snapshots/output/basic-project/3.1.0/lib/other.dart +++ /dev/null @@ -1,151 +0,0 @@ - import 'more.dart' deferred as more; -// definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/ -// ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/more. -// documentation -// > ```dart -// > as more -// > ``` - - class Foo { -// ^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo# -// documentation -// > ```dart -// > class Foo -// > ``` - int _far; -// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# -// ^^^^ definition local 0 -// documentation -// > ```dart -// > int _far -// > ``` -// diagnostic Warning: -// > The value of the field '_far' isn't used. - bool value; -// ^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`bool.dart`/bool# -// ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value. -// documentation -// > ```dart -// > bool value -// > ``` - String value2; -// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# -// ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value2. -// documentation -// > ```dart -// > String value2 -// > ``` - double value3; -// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`double.dart`/double# -// ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value3. -// documentation -// > ```dart -// > double value3 -// > ``` - Foo(this._far); -// ^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``(). -// documentation -// > ```dart -// > Foo Foo(int _far) -// > ``` -// diagnostic Error: -// > Non-nullable instance field 'value' must be initialized. -// diagnostic Error: -// > Non-nullable instance field 'value2' must be initialized. -// diagnostic Error: -// > Non-nullable instance field 'value3' must be initialized. -// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo# -// diagnostic Error: -// > Non-nullable instance field 'value' must be initialized. -// diagnostic Error: -// > Non-nullable instance field 'value2' must be initialized. -// diagnostic Error: -// > Non-nullable instance field 'value3' must be initialized. -// ^^^^ reference local 0 -// ^^^^ definition local 1 -// documentation -// > ```dart -// > int _far -// > ``` - } - - class Bar { -// ^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Bar# -// documentation -// > ```dart -// > class Bar -// > ``` - String _someValue; -// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# -// ^^^^^^^^^^ definition local 2 -// documentation -// > ```dart -// > String _someValue -// > ``` - Bar(this._someValue); -// ^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Bar#``(). -// documentation -// > ```dart -// > Bar Bar(String _someValue) -// > ``` -// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Bar# -// ^^^^ reference local 2 -// ^^^^^^^^^^ definition local 3 -// documentation -// > ```dart -// > String _someValue -// > ``` - - void someMethod() { -// ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Bar#someMethod(). -// documentation -// > ```dart -// > void someMethod() -// > ``` - _someValue = 'asdf'; -// ^^^^^^^^^^ reference local 2 - print(_someValue); -// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). -// ^^^^^^^^^^ reference local 2 - } - } - - void main() { -// ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/main(). -// documentation -// > ```dart -// > void main() -// > ``` - more.loadLibrary().then((_) => { -// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/more. -// ^^^^ reference scip-dart pub dart:async 3.1.0 dart:async/`future.dart`/Future#then(). -// ^ definition local 4 -// documentation -// > ```dart -// > dynamic _ -// > ``` - Bar('a').someMethod.call() -// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Bar# -// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Bar#someMethod(). - }); - - Foo()..value = false; -// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo# -// ^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value. - - final someStr = 'someStr'; -// ^^^^^^^ definition local 5 -// documentation -// > ```dart -// > String someStr -// > ``` - Foo() -// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo# - ..value = true -// ^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value. - ..value2 = someStr -// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value2. -// ^^^^^^^ reference local 5 - ..value3 = 2.15 -// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value3. - } diff --git a/snapshots/output/basic-project/3.1.0/lib/relationships.dart b/snapshots/output/basic-project/3.1.0/lib/relationships.dart deleted file mode 100755 index 3152f9d7..00000000 --- a/snapshots/output/basic-project/3.1.0/lib/relationships.dart +++ /dev/null @@ -1,81 +0,0 @@ - abstract class Mammal { -// definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/ -// ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal# -// documentation -// > ```dart -// > abstract class Mammal -// > ``` - String get hierarchy; -// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# -// ^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal#hierarchy. -// documentation -// > ```dart -// > String get hierarchy -// > ``` - } - - abstract class Animal extends Mammal { -// ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal# -// documentation -// > ```dart -// > abstract class Animal extends Mammal -// > ``` -// relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal# implementation -// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal# - String sound() => 'NOISE!'; -// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# -// ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal#sound(). -// documentation -// > ```dart -// > String sound() -// > ``` - } - - mixin SwimAction { -// ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/SwimAction# -// documentation -// > ```dart -// > mixin SwimAction on Object -// > ``` - void execute() => print('swimming...'); -// ^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/SwimAction#execute(). -// documentation -// > ```dart -// > void execute() -// > ``` -// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). - } - - class Dog extends Animal with SwimAction { -// ^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Dog# -// documentation -// > ```dart -// > class Dog extends Animal with SwimAction -// > ``` -// relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal# implementation -// relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal# implementation -// relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/SwimAction# implementation -// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal# -// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/SwimAction# - @override -// ^^^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`annotations.dart`/override. - String sound() => 'woof'; -// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# -// ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Dog#sound(). -// documentation -// > ```dart -// > String sound() -// > ``` -// relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal#sound(). implementation reference - - @override -// ^^^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`annotations.dart`/override. - String get hierarchy => 'dog.animal.mammal'; -// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# -// ^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Dog#hierarchy. -// documentation -// > ```dart -// > String get hierarchy -// > ``` -// relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal#hierarchy. implementation reference - } diff --git a/snapshots/output/basic-project/3.1.0/test/basic_test.dart b/snapshots/output/basic-project/3.1.0/test/basic_test.dart deleted file mode 100755 index e06a01f9..00000000 --- a/snapshots/output/basic-project/3.1.0/test/basic_test.dart +++ /dev/null @@ -1,18 +0,0 @@ - import 'package:test/test.dart'; -// definition scip-dart pub dart_test 1.0.0 test/`basic_test.dart`/ - - void main() { -// ^^^^ definition scip-dart pub dart_test 1.0.0 test/`basic_test.dart`/main(). -// documentation -// > ```dart -// > void main() -// > ``` - group('some test', () { -// ^^^^^ reference scip-dart pub test_core 0.5.3 lib/`scaffolding.dart`/group(). - test('equality', () { -// ^^^^ reference scip-dart pub test_core 0.5.3 lib/`scaffolding.dart`/test(). - expect(1, 1); -// ^^^^^^ reference scip-dart pub matcher 0.12.16 lib/src/expect/`expect.dart`/expect(). - }); - }); - } diff --git a/snapshots/output/basic-project/2.19.6/lib/main.dart b/snapshots/output/basic-project/lib/main.dart similarity index 100% rename from snapshots/output/basic-project/2.19.6/lib/main.dart rename to snapshots/output/basic-project/lib/main.dart diff --git a/snapshots/output/basic-project/2.19.6/lib/more.dart b/snapshots/output/basic-project/lib/more.dart similarity index 100% rename from snapshots/output/basic-project/2.19.6/lib/more.dart rename to snapshots/output/basic-project/lib/more.dart diff --git a/snapshots/output/basic-project/2.19.6/lib/other.dart b/snapshots/output/basic-project/lib/other.dart similarity index 100% rename from snapshots/output/basic-project/2.19.6/lib/other.dart rename to snapshots/output/basic-project/lib/other.dart diff --git a/snapshots/output/basic-project/2.19.6/lib/relationships.dart b/snapshots/output/basic-project/lib/relationships.dart similarity index 100% rename from snapshots/output/basic-project/2.19.6/lib/relationships.dart rename to snapshots/output/basic-project/lib/relationships.dart diff --git a/snapshots/output/basic-project/2.19.6/test/basic_test.dart b/snapshots/output/basic-project/test/basic_test.dart similarity index 100% rename from snapshots/output/basic-project/2.19.6/test/basic_test.dart rename to snapshots/output/basic-project/test/basic_test.dart diff --git a/snapshots/output/dart3-features/3.1.0/lib/main.dart b/snapshots/output/dart3-features/3.1.0/lib/main.dart deleted file mode 100755 index f9e7ade0..00000000 --- a/snapshots/output/dart3-features/3.1.0/lib/main.dart +++ /dev/null @@ -1,243 +0,0 @@ - (String, int) userInfo(Map json) { -// definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/ -// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# -// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# -// ^^^^^^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/userInfo(). -// documentation -// > ```dart -// > (String, int) userInfo(Map json) -// > ``` -// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`map.dart`/Map# -// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# -// ^^^^ definition local 0 -// documentation -// > ```dart -// > Map json -// > ``` - return (json['name'] as String, json['height'] as int); -// ^^^^ reference local 0 -// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# -// ^^^^ reference local 0 -// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# - } - - void parser(int charCode) { -// ^^^^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/parser(). -// documentation -// > ```dart -// > void parser(int charCode) -// > ``` -// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# -// ^^^^^^^^ definition local 1 -// documentation -// > ```dart -// > int charCode -// > ``` - const slash = 1; -// ^^^^^ definition local 2 -// documentation -// > ```dart -// > int slash -// > ``` - const star = 2; -// ^^^^ definition local 3 -// documentation -// > ```dart -// > int star -// > ``` - const plus = 3; -// ^^^^ definition local 4 -// documentation -// > ```dart -// > int plus -// > ``` - const minus = 4; -// ^^^^^ definition local 5 -// documentation -// > ```dart -// > int minus -// > ``` - - final nextCharCode = 'a'; -// ^^^^^^^^^^^^ definition local 6 -// documentation -// > ```dart -// > String nextCharCode -// > ``` - const digit0 = 0; -// ^^^^^^ definition local 7 -// documentation -// > ```dart -// > int digit0 -// > ``` - const digit9 = 9; -// ^^^^^^ definition local 8 -// documentation -// > ```dart -// > int digit9 -// > ``` - - void skipComment() {} -// ^^^^^^^^^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/skipComment(). -// documentation -// > ```dart -// > void skipComment() -// > ``` - void operatorFn(int charCode) {} -// ^^^^^^^^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/operatorFn(). -// documentation -// > ```dart -// > void operatorFn(int charCode) -// > ``` -// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# -// ^^^^^^^^ definition local 9 -// documentation -// > ```dart -// > int charCode -// > ``` - void number() {} -// ^^^^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/number(). -// documentation -// > ```dart -// > void number() -// > ``` - void invalid() {} -// ^^^^^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/invalid(). -// documentation -// > ```dart -// > void invalid() -// > ``` - - switch (charCode) { -// ^^^^^^^^ reference local 1 - case slash when nextCharCode == slash: -// ^^^^^ reference local 2 -// ^^^^^^^^^^^^ reference local 6 -// ^^^^^ reference local 2 - skipComment(); -// ^^^^^^^^^^^ reference scip-dart pub dart3_features 1.0.0 lib/`main.dart`/skipComment(). - - case slash || star || plus || minus: -// ^^^^^ reference local 2 -// ^^^^ reference local 3 -// ^^^^ reference local 4 -// ^^^^^ reference local 5 - operatorFn(charCode); -// ^^^^^^^^^^ reference scip-dart pub dart3_features 1.0.0 lib/`main.dart`/operatorFn(). -// ^^^^^^^^ reference local 1 - - case >= digit0 && <= digit9: -// ^^^^^^ reference local 7 -// ^^^^^^ reference local 8 - number(); -// ^^^^^^ reference scip-dart pub dart3_features 1.0.0 lib/`main.dart`/number(). - - default: - invalid(); -// ^^^^^^^ reference scip-dart pub dart3_features 1.0.0 lib/`main.dart`/invalid(). - } - } - - const six = 6; -// ^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/six. -// documentation -// > ```dart -// > int six -// > ``` - const msg = 'Feeling the Monday blues?'; -// ^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/msg. -// documentation -// > ```dart -// > String msg -// > ``` - String describeDate(DateTime dt) { -//^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# -// ^^^^^^^^^^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/describeDate(). -// documentation -// > ```dart -// > String describeDate(DateTime dt) -// > ``` -// ^^^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`date_time.dart`/DateTime# -// ^^ definition local 10 -// documentation -// > ```dart -// > DateTime dt -// > ``` - const one = 1; -// ^^^ definition local 11 -// documentation -// > ```dart -// > int one -// > ``` - return switch (dt.weekday) { -// ^^ reference local 10 -// ^^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`date_time.dart`/DateTime#weekday. - one => 'Feeling the Monday blues?', -// ^^^ reference local 11 - 7 || six => 'Enjoy the weekend!', -// ^^^ reference scip-dart pub dart3_features 1.0.0 lib/`main.dart`/six. - _ => 'Hang in there.' - }; - } - - void main() { -// ^^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/main(). -// documentation -// > ```dart -// > void main() -// > ``` - var ( - String name, -// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# - int height, -// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# - ) = userInfo({'name': 'Michael', 'height': 180}); -// ^^^^^^^^ reference scip-dart pub dart3_features 1.0.0 lib/`main.dart`/userInfo(). - print('User $name is $height cm tall.'); -// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). -// ^^^^ reference local 12 -// ^^^^^^ reference local 13 - - final json = {'name': 'Michael', 'height': 180}; -// ^^^^ definition local 14 -// documentation -// > ```dart -// > Map json -// > ``` - if (json case {'name': 'Michael', 'height': int h}) { -// ^^^^ reference local 14 -// ^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`int.dart`/int# - print('Michael is $h cm tall.'); -// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). -// ^ reference local 15 - } - } - - base class Foo {} -// ^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/Foo# -// documentation -// > ```dart -// > base class Foo -// > ``` - - final class Bar {} -// ^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/Bar# -// documentation -// > ```dart -// > final class Bar -// > ``` - - interface class Car {} -// ^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/Car# -// documentation -// > ```dart -// > interface class Car -// > ``` - - sealed class Zar {} -// ^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/Zar# -// documentation -// > ```dart -// > sealed class Zar -// > ``` - diff --git a/snapshots/output/dart3-features/2.19.6/lib/main.dart b/snapshots/output/dart3-features/lib/main.dart similarity index 77% rename from snapshots/output/dart3-features/2.19.6/lib/main.dart rename to snapshots/output/dart3-features/lib/main.dart index b3cfabf8..49093560 100755 --- a/snapshots/output/dart3-features/2.19.6/lib/main.dart +++ b/snapshots/output/dart3-features/lib/main.dart @@ -64,6 +64,8 @@ // > ```dart // > String nextCharCode // > ``` +// diagnostic Warning: +// > The value of the local variable 'nextCharCode' isn't used. const digit0 = 0; // ^^^^^^ definition local 7 // documentation @@ -112,16 +114,26 @@ // ^^^^^^^^ reference local 1 case slash when nextCharCode == slash: // ^^^^^ reference local 2 -// ^^^^^^^^^^^^ reference local 6 -// ^^^^^ reference local 2 skipComment(); // ^^^^^^^^^^^ reference scip-dart pub dart3_features 1.0.0 lib/`main.dart`/skipComment(). case slash || star || plus || minus: // ^^^^^ reference local 2 +// diagnostic Error: +// > The operands of the operator '||' must be assignable to 'bool'. +// diagnostic Error: +// > The switch case expression type 'bool' must be a subtype of the switch expression type 'int'. +// diagnostic Error: +// > In constant expressions, operands of this operator must be of type 'bool'. // ^^^^ reference local 3 +// diagnostic Error: +// > The operands of the operator '||' must be assignable to 'bool'. // ^^^^ reference local 4 +// diagnostic Error: +// > The operands of the operator '||' must be assignable to 'bool'. // ^^^^^ reference local 5 +// diagnostic Error: +// > The operands of the operator '||' must be assignable to 'bool'. operatorFn(charCode); // ^^^^^^^^^^ reference scip-dart pub dart3_features 1.0.0 lib/`main.dart`/operatorFn(). // ^^^^^^^^ reference local 1 @@ -169,13 +181,13 @@ // > ```dart // > int one // > ``` +// diagnostic Warning: +// > The value of the local variable 'one' isn't used. return switch (dt.weekday) { // ^^ reference local 10 // ^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`date_time.dart`/DateTime#weekday. one => 'Feeling the Monday blues?', -// ^^^ reference local 11 7 || six => 'Enjoy the weekend!', -// ^^^ reference scip-dart pub dart3_features 1.0.0 lib/`main.dart`/six. _ => 'Hang in there.' }; } @@ -188,28 +200,62 @@ // > ``` var ( String name, +// definition local 12 +// documentation +// > ```dart +// > dynamic +// > ``` // ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^^ definition local 13 +// documentation +// > ```dart +// > String name +// > ``` int height, -// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# +// ^^^ definition local 14 +// documentation +// > ```dart +// > String int +// > ``` +// diagnostic Error: +// > Expected to find ';'. +// diagnostic Warning: +// > The value of the local variable 'int' isn't used. +// reference local 12 +// diagnostic Error: +// > Expected an identifier. +// diagnostic Error: +// > Unexpected text ';'. +// diagnostic Error: +// > Expected to find ';'. ) = userInfo({'name': 'Michael', 'height': 180}); +// reference local 12 +// diagnostic Error: +// > Expected an identifier. +// diagnostic Error: +// > Unexpected text ';'. +// reference local 12 +// diagnostic Error: +// > Expected an identifier. // ^^^^^^^^ reference scip-dart pub dart3_features 1.0.0 lib/`main.dart`/userInfo(). print('User $name is $height cm tall.'); // ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). -// ^^^^ reference local 12 -// ^^^^^^ reference local 13 +// ^^^^ reference local 13 +// diagnostic Error: +// > The non-nullable local variable 'name' must be assigned before it can be used. final json = {'name': 'Michael', 'height': 180}; -// ^^^^ definition local 14 +// ^^^^ definition local 15 // documentation // > ```dart // > Map json // > ``` if (json case {'name': 'Michael', 'height': int h}) { -// ^^^^ reference local 14 -// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# +// ^^^^ reference local 15 +// diagnostic Error: +// > Conditions must have a static type of 'bool'. print('Michael is $h cm tall.'); // ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). -// ^ reference local 15 } } @@ -217,27 +263,27 @@ // ^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/Foo# // documentation // > ```dart -// > base class Foo +// > class Foo // > ``` final class Bar {} // ^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/Bar# // documentation // > ```dart -// > final class Bar +// > class Bar // > ``` interface class Car {} // ^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/Car# // documentation // > ```dart -// > interface class Car +// > class Car // > ``` sealed class Zar {} // ^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/Zar# // documentation // > ```dart -// > sealed class Zar +// > class Zar // > ``` diff --git a/snapshots/output/diagnostics/3.1.0/lib/main.dart b/snapshots/output/diagnostics/3.1.0/lib/main.dart deleted file mode 100755 index 85ac8cb1..00000000 --- a/snapshots/output/diagnostics/3.1.0/lib/main.dart +++ /dev/null @@ -1,105 +0,0 @@ - import 'dart:collection'; // unused import -// definition scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/ - - class _UnusedClass {} -// ^^^^^^^^^^^^ definition local 0 -// documentation -// > ```dart -// > class _UnusedClass -// > ``` -// diagnostic Information: -// > The declaration '_UnusedClass' isn't referenced. - - void _unusedMethod() {} -// ^^^^^^^^^^^^^ definition local 1 -// documentation -// > ```dart -// > void _unusedMethod() -// > ``` -// diagnostic Information: -// > The declaration '_unusedMethod' isn't referenced. - - String _unusedTopLevelVariable = 'asdf'; -//^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# -// ^^^^^^^^^^^^^^^^^^^^^^^ definition local 2 -// documentation -// > ```dart -// > String _unusedTopLevelVariable -// > ``` -// diagnostic Information: -// > The declaration '_unusedTopLevelVariable' isn't referenced. - - @Deprecated('This method is deprecated') -// ^^^^^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`annotations.dart`/Deprecated# - void deprecatedMethod() {} -// ^^^^^^^^^^^^^^^^ definition scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/deprecatedMethod(). -// documentation -// > ```dart -// > void deprecatedMethod() -// > ``` - - void deprecatedParam({ -// ^^^^^^^^^^^^^^^ definition scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/deprecatedParam(). -// documentation -// > ```dart -// > void deprecatedParam({dynamic foobar}) -// > ``` - @Deprecated('this param is deprecated') dynamic foobar -// ^^^^^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`annotations.dart`/Deprecated# -// ^^^^^^ definition scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/deprecatedParam().(foobar) -// documentation -// > ```dart -// > {dynamic foobar} -// > ``` - }) {} - - void main() { -// ^^^^ definition scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/main(). -// documentation -// > ```dart -// > void main() -// > ``` - final unusedVariable = 'asdf'; -// ^^^^^^^^^^^^^^ definition local 3 -// documentation -// > ```dart -// > String unusedVariable -// > ``` -// diagnostic Warning: -// > The value of the local variable 'unusedVariable' isn't used. - - String variableWithUnecssaryDeclaration = 'asdf'; -// ^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`string.dart`/String# -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ definition local 4 -// documentation -// > ```dart -// > String variableWithUnecssaryDeclaration -// > ``` -// diagnostic Warning: -// > The value of the local variable 'variableWithUnecssaryDeclaration' isn't used. - - // dead_code example - if (true) { } else { - print('This condition is never met!'); -// ^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`print.dart`/print(). - } - - deprecatedMethod(); -// ^^^^^^^^^^^^^^^^ reference scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/deprecatedMethod(). -// diagnostic Information: -// > 'deprecatedMethod' is deprecated and shouldn't be used. This method is deprecated. - deprecatedParam(foobar: 2); -// ^^^^^^^^^^^^^^^ reference scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/deprecatedParam(). -// ^^^^^^ reference scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/deprecatedParam().(foobar) -// diagnostic Information: -// > 'foobar' is deprecated and shouldn't be used. this param is deprecated. - } - - @deprecated -// ^^^^^^^^^^ reference scip-dart pub dart:core 3.1.0 dart:core/`annotations.dart`/deprecated. - void someDeprecatedFunc() {} -// ^^^^^^^^^^^^^^^^^^ definition scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/someDeprecatedFunc(). -// documentation -// > ```dart -// > void someDeprecatedFunc() -// > ``` diff --git a/snapshots/output/diagnostics/2.19.6/lib/main.dart b/snapshots/output/diagnostics/lib/main.dart similarity index 100% rename from snapshots/output/diagnostics/2.19.6/lib/main.dart rename to snapshots/output/diagnostics/lib/main.dart diff --git a/tool/regen-snapshots.sh b/tool/regen-snapshots.sh index 92ced581..3fb8df20 100755 --- a/tool/regen-snapshots.sh +++ b/tool/regen-snapshots.sh @@ -1,8 +1,8 @@ #!/bin/bash -dart --version +# dart --version -DART_VERSION=$(dart --version | grep -o '[0-9]*\.[0-9]*\.[0-9]*' | awk 'NR==1') +# DART_VERSION=$(dart --version | grep -o '[0-9]*\.[0-9]*\.[0-9]*' | awk 'NR==1') PROJECTS=( @@ -12,7 +12,6 @@ PROJECTS=( ) for project in "${PROJECTS[@]}"; do - dart pub upgrade dart run scip_dart "./snapshots/input/$project" - scip snapshot --to "./snapshots/output/$project/$DART_VERSION" + scip snapshot --to "./snapshots/output/$project/" done \ No newline at end of file From 59fa2d54adc895117161eff437fd13aa0e67efe4 Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Sun, 28 Jan 2024 16:58:43 -0700 Subject: [PATCH 10/16] cleaned up shell script --- pubspec.yaml | 2 +- tool/regen-snapshots.sh | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/pubspec.yaml b/pubspec.yaml index fdf6fa11..48800333 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -10,7 +10,7 @@ executables: scip_dart: dependencies: - analyzer: ^5.4.0 + analyzer: ^5.13.0 args: ^2.4.0 package_config: ^2.1.0 path: ^1.8.3 diff --git a/tool/regen-snapshots.sh b/tool/regen-snapshots.sh index 3fb8df20..ef9010b8 100755 --- a/tool/regen-snapshots.sh +++ b/tool/regen-snapshots.sh @@ -1,10 +1,5 @@ #!/bin/bash -# dart --version - -# DART_VERSION=$(dart --version | grep -o '[0-9]*\.[0-9]*\.[0-9]*' | awk 'NR==1') - - PROJECTS=( basic-project dart3-features From c37afea5cfe083b578a25f1b49e4b727e56ebb0b Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Thu, 22 May 2025 19:57:27 -1000 Subject: [PATCH 11/16] merged maseter snapshots/basic-project directory --- .tool-versions | 1 + pubspec.lock | 212 +----------------- snapshots/input/basic-project/lib/main.dart | 2 +- snapshots/input/basic-project/lib/more.dart | 14 +- snapshots/input/basic-project/lib/other.dart | 19 +- .../basic-project/lib/relationships.dart | 15 +- snapshots/input/basic-project/pubspec.yaml | 2 +- snapshots/output/basic-project/lib/main.dart | 66 +----- snapshots/output/basic-project/lib/more.dart | 209 ++++------------- snapshots/output/basic-project/lib/other.dart | 142 ++++-------- .../basic-project/lib/relationships.dart | 78 +++---- snapshots/output/basic-project/pubspec.yaml | 10 + .../output/basic-project/test/basic_test.dart | 4 - 13 files changed, 188 insertions(+), 586 deletions(-) create mode 100644 .tool-versions create mode 100755 snapshots/output/basic-project/pubspec.yaml diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 00000000..ed696fba --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +dart 3.7.2 diff --git a/pubspec.lock b/pubspec.lock index f11336a5..e0bf1cef 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -33,22 +33,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.11.0" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" - url: "https://pub.dev" - source: hosted - version: "2.1.1" - build: - dependency: transitive - description: - name: build - sha256: "3fbda25365741f8251b39f3917fb3c8e286a96fd068a5a242e11c2012d495777" - url: "https://pub.dev" - source: hosted - version: "2.3.1" build_config: dependency: transitive description: @@ -57,54 +41,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.1" - build_daemon: - dependency: transitive - description: - name: build_daemon - sha256: "757153e5d9cd88253cb13f28c2fb55a537dc31fefd98137549895b5beb7c6169" - url: "https://pub.dev" - source: hosted - version: "3.1.1" - build_resolvers: - dependency: transitive - description: - name: build_resolvers - sha256: "0713a05b0386bd97f9e63e78108805a4feca5898a4b821d6610857f10c91e975" - url: "https://pub.dev" - source: hosted - version: "2.4.0" - build_runner: - dependency: transitive - description: - name: build_runner - sha256: b0a8a7b8a76c493e85f1b84bffa0588859a06197863dba8c9036b15581fd9727 - url: "https://pub.dev" - source: hosted - version: "2.3.3" - build_runner_core: - dependency: transitive - description: - name: build_runner_core - sha256: "0671ad4162ed510b70d0eb4ad6354c249f8429cab4ae7a4cec86bbc2886eb76e" - url: "https://pub.dev" - source: hosted - version: "7.2.7+1" - built_collection: - dependency: transitive - description: - name: built_collection - sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" - url: "https://pub.dev" - source: hosted - version: "5.1.1" - built_value: - dependency: transitive - description: - name: built_value - sha256: "69acb7007eb2a31dc901512bfe0f7b767168be34cb734835d54c070bfa74c1b2" - url: "https://pub.dev" - source: hosted - version: "8.8.0" chalk: dependency: "direct dev" description: @@ -121,14 +57,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.3" - code_builder: - dependency: transitive - description: - name: code_builder - sha256: "1be9be30396d7e4c0db42c35ea6ccd7cc6a1e19916b5dc64d6ac216b5544d677" - url: "https://pub.dev" - source: hosted - version: "4.7.0" collection: dependency: transitive description: @@ -157,18 +85,10 @@ packages: dependency: "direct dev" description: name: dart_dev - sha256: "05b00aabe00a284ccf007188475cce7963bf54fa266bb04856687d50d8b82ac1" - url: "https://pub.dev" - source: hosted - version: "4.1.0" - dart_style: - dependency: transitive - description: - name: dart_style - sha256: "1efa911ca7086affd35f463ca2fc1799584fb6aa89883cf0af8e3664d6a02d55" + sha256: c76722c5b0c7b2d86d5ba26ee15abba97073c48b01a1de681ce09192695b79d8 url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "4.2.3" dependency_validator: dependency: "direct dev" description: @@ -193,14 +113,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.0" - frontend_server_client: - dependency: transitive - description: - name: frontend_server_client - sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" - url: "https://pub.dev" - source: hosted - version: "3.2.0" glob: dependency: "direct dev" description: @@ -209,30 +121,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.2" - graphs: - dependency: transitive - description: - name: graphs - sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 - url: "https://pub.dev" - source: hosted - version: "2.3.1" - http_multi_server: - dependency: transitive - description: - name: http_multi_server - sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" - url: "https://pub.dev" - source: hosted - version: "3.2.1" - http_parser: - dependency: transitive - description: - name: http_parser - sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" - url: "https://pub.dev" - source: hosted - version: "4.0.2" io: dependency: transitive description: @@ -241,14 +129,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.4" - js: - dependency: transitive - description: - name: js - sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 - url: "https://pub.dev" - source: hosted - version: "0.6.7" json_annotation: dependency: transitive description: @@ -265,30 +145,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.0" - matcher: - dependency: transitive - description: - name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" - url: "https://pub.dev" - source: hosted - version: "0.12.16" meta: dependency: transitive description: name: meta - sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 - url: "https://pub.dev" - source: hosted - version: "1.11.0" - mime: - dependency: transitive - description: - name: mime - sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e + sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.16.0" package_config: dependency: "direct main" description: @@ -305,14 +169,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.8.3" - pool: - dependency: transitive - description: - name: pool - sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" - url: "https://pub.dev" - source: hosted - version: "1.5.1" protobuf: dependency: "direct main" description: @@ -337,22 +193,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.3" - shelf: - dependency: transitive - description: - name: shelf - sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 - url: "https://pub.dev" - source: hosted - version: "1.4.1" - shelf_web_socket: - dependency: transitive - description: - name: shelf_web_socket - sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" - url: "https://pub.dev" - source: hosted - version: "1.0.4" source_span: dependency: transitive description: @@ -369,22 +209,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.11.1" - stream_channel: - dependency: transitive - description: - name: stream_channel - sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 - url: "https://pub.dev" - source: hosted - version: "2.1.2" - stream_transform: - dependency: transitive - description: - name: stream_transform - sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" - url: "https://pub.dev" - source: hosted - version: "2.1.0" string_scanner: dependency: transitive description: @@ -401,22 +225,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.1" - test_api: - dependency: transitive - description: - name: test_api - sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" - url: "https://pub.dev" - source: hosted - version: "0.6.0" - timing: - dependency: transitive - description: - name: timing - sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" - url: "https://pub.dev" - source: hosted - version: "1.0.1" typed_data: dependency: transitive description: @@ -433,22 +241,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.2" - web_socket_channel: - dependency: transitive - description: - name: web_socket_channel - sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b - url: "https://pub.dev" - source: hosted - version: "2.4.0" workiva_analysis_options: dependency: "direct dev" description: name: workiva_analysis_options - sha256: d7b1b88c2e4c5f795c56f40940583fa2de40510a23ef494a29db32699af52a3d + sha256: "0a3c7880dfa23aa24ca8dcefe9906c5dccadb4cbd5ce8e9a98f8d83a877a2fa7" url: "https://pub.dev" source: hosted - version: "1.4.1" + version: "1.4.3" yaml: dependency: transitive description: diff --git a/snapshots/input/basic-project/lib/main.dart b/snapshots/input/basic-project/lib/main.dart index cbb519c9..26437877 100644 --- a/snapshots/input/basic-project/lib/main.dart +++ b/snapshots/input/basic-project/lib/main.dart @@ -43,5 +43,5 @@ class SomeLocalClass {} /// Reference external class: [Foo] /// Missing Reference: [IDontExist] void someFunction(int value) { - Foo(1); + Foo(1, value: true, value2: ''); } \ No newline at end of file diff --git a/snapshots/input/basic-project/lib/more.dart b/snapshots/input/basic-project/lib/more.dart index 7b57fcde..678db4ff 100644 --- a/snapshots/input/basic-project/lib/more.dart +++ b/snapshots/input/basic-project/lib/more.dart @@ -20,6 +20,7 @@ class Animal with SleepMixin { SoundMaker? soundMaker; Animal(this.name, {required this.type}) { + print(AnimalType.values); switch (type) { case AnimalType.cat: soundMaker = () => print('Meow!'); @@ -35,6 +36,8 @@ class Animal with SleepMixin { } } + factory Animal.cat() => Animal('Timmy', type: AnimalType.cat); + void makeSound() { soundMaker?.call(); } @@ -53,16 +56,19 @@ void main() { List numbers = [1, 2, 3, 4, 5]; int sum = calculateSum(numbers); - Animal cat = Animal('Kitty', type: AnimalType.cat); + Animal bird = Animal('Kitty', type: AnimalType.bird); Animal dog = Animal('Buddy', type: AnimalType.dog); + Animal cat = Animal.cat(); - cat.makeSound(); - cat.sleep(); + bird.makeSound(); + bird.sleep(); dog.makeSound(); dog.sleep(); - print(cat); + cat.makeSound(); + + print(bird); print(dog); print('The sum of $numbers is $sum'); diff --git a/snapshots/input/basic-project/lib/other.dart b/snapshots/input/basic-project/lib/other.dart index 36a9d4c7..810b501f 100644 --- a/snapshots/input/basic-project/lib/other.dart +++ b/snapshots/input/basic-project/lib/other.dart @@ -4,8 +4,15 @@ class Foo { int _far; bool value; String value2; - double value3; - Foo(this._far); + double? value3; + Foo( + this._far, { + required this.value, + required this.value2, + this.value3, + }) { + print(_far); + } } class Bar { @@ -23,11 +30,13 @@ void main() { Bar('a').someMethod.call() }); - Foo()..value = false; + Foo(1, value: true, value2: 'asdf')..value = false; final someStr = 'someStr'; - Foo() + Foo(2, value: false, value2: 'some Val!') ..value = true ..value2 = someStr - ..value3 = 2.15 + ..value3 = 2.15; + + more.test((_) => 'val'); } \ No newline at end of file diff --git a/snapshots/input/basic-project/lib/relationships.dart b/snapshots/input/basic-project/lib/relationships.dart index bd028ee2..9218058c 100644 --- a/snapshots/input/basic-project/lib/relationships.dart +++ b/snapshots/input/basic-project/lib/relationships.dart @@ -1,9 +1,14 @@ abstract class Mammal { - String get hierarchy; + String get someGetter; + set someSetter(String v); + String field = ''; } abstract class Animal extends Mammal { String sound() => 'NOISE!'; + + @override + String field = 'asdf'; } mixin SwimAction { @@ -11,9 +16,15 @@ mixin SwimAction { } class Dog extends Animal with SwimAction { + @override + String field = 'otherVal'; + @override String sound() => 'woof'; @override - String get hierarchy => 'dog.animal.mammal'; + String get someGetter => 'value'; + + @override + set someSetter(String v) => print(v); } \ No newline at end of file diff --git a/snapshots/input/basic-project/pubspec.yaml b/snapshots/input/basic-project/pubspec.yaml index 5b2fdcb4..6af1a5e7 100644 --- a/snapshots/input/basic-project/pubspec.yaml +++ b/snapshots/input/basic-project/pubspec.yaml @@ -2,7 +2,7 @@ name: dart_test version: 1.0.0 environment: - sdk: ">=2.18.0 <3.0.0" + sdk: '>=2.19.0 <3.0.0' dependencies: test: ^1.24.3 \ No newline at end of file diff --git a/snapshots/output/basic-project/lib/main.dart b/snapshots/output/basic-project/lib/main.dart index cdaed412..e9933d30 100755 --- a/snapshots/output/basic-project/lib/main.dart +++ b/snapshots/output/basic-project/lib/main.dart @@ -9,19 +9,11 @@ //^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# // ^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/fib(). // documentation -// > ```dart -// > int fib(int n) -// > ``` -// documentation // > This is a fib function // > Takes a number // > Returns a number // ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# // ^ definition local 0 -// documentation -// > ```dart -// > int n -// > ``` if (n <= 1) return 0; // ^ reference local 0 return fib(n - 1) + fib(n - 2); @@ -33,16 +25,8 @@ void print_fib(int a) { // ^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/print_fib(). -// documentation -// > ```dart -// > void print_fib(int a) -// > ``` // ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# // ^ definition local 1 -// documentation -// > ```dart -// > int a -// > ``` print(fib(a)); // ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). // ^^^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/fib(). @@ -51,50 +35,26 @@ final y = 'Hello'; // ^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/y. -// documentation -// > ```dart -// > String y -// > ``` String capture() { //^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# // ^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/capture(). -// documentation -// > ```dart -// > String capture() -// > ``` return y; // ^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/y. } final capture_lambda = () => y; // ^^^^^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/capture_lambda. -// documentation -// > ```dart -// > String Function() capture_lambda -// > ``` // ^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/y. void main() { // ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/main(). -// documentation -// > ```dart -// > void main() -// > ``` for (var i = 0; i <= 10; i++) {} // ^ definition local 2 -// documentation -// > ```dart -// > int i -// > ``` // ^ reference local 2 // ^ reference local 2 for (var i in [1, 2, 3]) { // ^ definition local 3 -// documentation -// > ```dart -// > int i -// > ``` print(i); // ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). // ^ reference local 3 @@ -102,10 +62,6 @@ var a = 0; // ^ definition local 4 -// documentation -// > ```dart -// > int a -// > ``` a = 1; // ^ reference local 4 print_fib(a); @@ -115,20 +71,12 @@ void forever() { // ^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/forever(). -// documentation -// > ```dart -// > void forever() -// > ``` return forever(); // ^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/forever(). } class SomeLocalClass {} // ^^^^^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/SomeLocalClass# -// documentation -// > ```dart -// > class SomeLocalClass -// > ``` /// Reference parameter: [value] // ^^^^^ reference local 5 @@ -140,20 +88,14 @@ void someFunction(int value) { // ^^^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/someFunction(). // documentation -// > ```dart -// > void someFunction(int value) -// > ``` -// documentation // > Reference parameter: [value] // > Reference class: [SomeLocalClass] // > Reference external class: [Foo] // > Missing Reference: [IDontExist] // ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# // ^^^^^ definition local 5 -// documentation -// > ```dart -// > int value -// > ``` - Foo(1); -// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo# + Foo(1, value: true, value2: ''); +// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``(). +// ^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``().(value) +// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``().(value2) } diff --git a/snapshots/output/basic-project/lib/more.dart b/snapshots/output/basic-project/lib/more.dart index 9857ba25..22bf7d7d 100755 --- a/snapshots/output/basic-project/lib/more.dart +++ b/snapshots/output/basic-project/lib/more.dart @@ -1,56 +1,24 @@ import 'dart:math' as math; // definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/ // ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/math. -// documentation -// > ```dart -// > as math -// > ``` enum AnimalType { // ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# -// documentation -// > ```dart -// > enum AnimalType -// > ``` cat, // ^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#cat. -// documentation -// > ```dart -// > AnimalType cat -// > ``` dog, // ^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#dog. -// documentation -// > ```dart -// > AnimalType dog -// > ``` bird, // ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#bird. -// documentation -// > ```dart -// > AnimalType bird -// > ``` } typedef SoundMaker = void Function(); // ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/SoundMaker# -// documentation -// > ```dart -// > typedef SoundMaker = void Function() -// > ``` mixin SleepMixin { // ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/SleepMixin# -// documentation -// > ```dart -// > mixin SleepMixin on Object -// > ``` void sleep() { // ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/SleepMixin#sleep(). -// documentation -// > ```dart -// > void sleep() -// > ``` print('zzz...'); // ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). } @@ -58,53 +26,26 @@ class Animal with SleepMixin { // ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal# -// documentation -// > ```dart -// > class Animal with SleepMixin -// > ``` // relationship scip-dart pub dart_test 1.0.0 lib/`more.dart`/SleepMixin# implementation // ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/SleepMixin# String name; // ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# // ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#name. -// documentation -// > ```dart -// > String name -// > ``` AnimalType type; // ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# // ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#type. -// documentation -// > ```dart -// > AnimalType type -// > ``` SoundMaker? soundMaker; // ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/SoundMaker# // ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#soundMaker. -// documentation -// > ```dart -// > void Function() soundMaker -// > ``` Animal(this.name, {required this.type}) { // ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#``(). -// documentation -// > ```dart -// > Animal Animal(String name, {required AnimalType type}) -// > ``` -// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal# -// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#name. -// ^^^^ definition local 0 -// documentation -// > ```dart -// > String name -// > ``` -// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#type. +// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#name. +// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#type. // ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#``().(type) -// documentation -// > ```dart -// > {required AnimalType type} -// > ``` + print(AnimalType.values); +// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# switch (type) { // ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#type. case AnimalType.cat: @@ -135,12 +76,15 @@ } } + factory Animal.cat() => Animal('Timmy', type: AnimalType.cat); +// ^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#cat(). +// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#``(). +// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#``().(type) +// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# +// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#cat. + void makeSound() { // ^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#makeSound(). -// documentation -// > ```dart -// > void makeSound() -// > ``` soundMaker?.call(); // ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#soundMaker. } @@ -150,10 +94,6 @@ String toString() { // ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# // ^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#toString(). -// documentation -// > ```dart -// > String toString() -// > ``` // relationship scip-dart pub dart:core 2.19.0 dart:core/`object.dart`/Object#toString(). implementation reference return '$name the $type'; // ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#name. @@ -164,150 +104,99 @@ int calculateSum(List numbers) { //^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# // ^^^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/calculateSum(). -// documentation -// > ```dart -// > int calculateSum(List numbers) -// > ``` // ^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`list.dart`/List# // ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# -// ^^^^^^^ definition local 1 -// documentation -// > ```dart -// > List numbers -// > ``` +// ^^^^^^^ definition local 0 return numbers.reduce((value, element) => value + element); -// ^^^^^^^ reference local 1 +// ^^^^^^^ reference local 0 // ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`iterable.dart`/Iterable#reduce(). -// ^^^^^ definition local 2 -// documentation -// > ```dart -// > int value -// > ``` -// ^^^^^^^ definition local 3 -// documentation -// > ```dart -// > int element -// > ``` -// ^^^^^ reference local 2 -// ^^^^^^^ reference local 3 +// ^^^^^ definition local 1 +// ^^^^^^^ definition local 2 +// ^^^^^ reference local 1 +// ^^^^^^^ reference local 2 } void main() { // ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/main(). -// documentation -// > ```dart -// > void main() -// > ``` List numbers = [1, 2, 3, 4, 5]; // ^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`list.dart`/List# // ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# -// ^^^^^^^ definition local 4 -// documentation -// > ```dart -// > List numbers -// > ``` +// ^^^^^^^ definition local 3 int sum = calculateSum(numbers); // ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# -// ^^^ definition local 5 -// documentation -// > ```dart -// > int sum -// > ``` +// ^^^ definition local 4 // ^^^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/calculateSum(). -// ^^^^^^^ reference local 4 +// ^^^^^^^ reference local 3 - Animal cat = Animal('Kitty', type: AnimalType.cat); + Animal bird = Animal('Kitty', type: AnimalType.bird); +// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal# +// ^^^^ definition local 5 +// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#``(). +// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#``().(type) +// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# +// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#bird. + Animal dog = Animal('Buddy', type: AnimalType.dog); // ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal# // ^^^ definition local 6 -// documentation -// > ```dart -// > Animal cat -// > ``` -// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal# +// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#``(). // ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#``().(type) // ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# -// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#cat. - Animal dog = Animal('Buddy', type: AnimalType.dog); +// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#dog. + Animal cat = Animal.cat(); // ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal# // ^^^ definition local 7 -// documentation -// > ```dart -// > Animal dog -// > ``` // ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal# -// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#``().(type) -// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# -// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#dog. +// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#cat(). - cat.makeSound(); + bird.makeSound(); +// ^^^^ reference local 5 +// ^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#makeSound(). + bird.sleep(); +// ^^^^ reference local 5 +// ^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/SleepMixin#sleep(). + + dog.makeSound(); // ^^^ reference local 6 // ^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#makeSound(). - cat.sleep(); + dog.sleep(); // ^^^ reference local 6 // ^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/SleepMixin#sleep(). - dog.makeSound(); + cat.makeSound(); // ^^^ reference local 7 // ^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#makeSound(). - dog.sleep(); -// ^^^ reference local 7 -// ^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/SleepMixin#sleep(). - print(cat); + print(bird); // ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). -// ^^^ reference local 6 +// ^^^^ reference local 5 print(dog); // ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). -// ^^^ reference local 7 +// ^^^ reference local 6 print('The sum of $numbers is $sum'); // ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). -// ^^^^^^^ reference local 4 -// ^^^ reference local 5 +// ^^^^^^^ reference local 3 +// ^^^ reference local 4 print(math.Rectangle(1,2,3,4)); // ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). // ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/math. -// ^^^^^^^^^ reference scip-dart pub dart:math 2.19.0 dart:math/`rectangle.dart`/Rectangle# +// ^^^^^^^^^ reference scip-dart pub dart:math 2.19.0 dart:math/`rectangle.dart`/Rectangle#``(). [1,2].reduce((a, b) => a + b); // ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`iterable.dart`/Iterable#reduce(). // ^ definition local 8 -// documentation -// > ```dart -// > int a -// > ``` // ^ definition local 9 -// documentation -// > ```dart -// > int b -// > ``` // ^ reference local 8 // ^ reference local 9 } void test(String Function(int) p) {} // ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/test(). -// documentation -// > ```dart -// > void test(String Function(int) p) -// > ``` // ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# // ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# // ^ definition local 10 -// documentation -// > ```dart -// > String Function(int) p -// > ``` void deepTest(String Function(void Function(String test)) p) {} // ^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/deepTest(). -// documentation -// > ```dart -// > void deepTest(String Function(void Function(String)) p) -// > ``` // ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# // ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# // ^ definition local 11 -// documentation -// > ```dart -// > String Function(void Function(String)) p -// > ``` diff --git a/snapshots/output/basic-project/lib/other.dart b/snapshots/output/basic-project/lib/other.dart index da91268d..30a16588 100755 --- a/snapshots/output/basic-project/lib/other.dart +++ b/snapshots/output/basic-project/lib/other.dart @@ -1,151 +1,93 @@ import 'more.dart' deferred as more; // definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/ // ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/more. -// documentation -// > ```dart -// > as more -// > ``` class Foo { // ^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo# -// documentation -// > ```dart -// > class Foo -// > ``` int _far; // ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# // ^^^^ definition local 0 -// documentation -// > ```dart -// > int _far -// > ``` -// diagnostic Warning: -// > The value of the field '_far' isn't used. bool value; // ^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`bool.dart`/bool# // ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value. -// documentation -// > ```dart -// > bool value -// > ``` String value2; // ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# // ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value2. -// documentation -// > ```dart -// > String value2 -// > ``` - double value3; + double? value3; // ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`double.dart`/double# -// ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value3. -// documentation -// > ```dart -// > double value3 -// > ``` - Foo(this._far); +// ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value3. + Foo( // ^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``(). -// documentation -// > ```dart -// > Foo Foo(int _far) -// > ``` -// diagnostic Error: -// > Non-nullable instance field 'value' must be initialized. -// diagnostic Error: -// > Non-nullable instance field 'value2' must be initialized. -// diagnostic Error: -// > Non-nullable instance field 'value3' must be initialized. -// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo# -// diagnostic Error: -// > Non-nullable instance field 'value' must be initialized. -// diagnostic Error: -// > Non-nullable instance field 'value2' must be initialized. -// diagnostic Error: -// > Non-nullable instance field 'value3' must be initialized. -// ^^^^ reference local 0 -// ^^^^ definition local 1 -// documentation -// > ```dart -// > int _far -// > ``` + this._far, { +// ^^^^ reference local 0 + required this.value, +// ^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value. +// ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``().(value) + required this.value2, +// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value2. +// ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``().(value2) + this.value3, +// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value3. +// ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``().(value3) + }) { + print(_far); +// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^^^^ reference local 0 + } } class Bar { // ^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Bar# -// documentation -// > ```dart -// > class Bar -// > ``` String _someValue; // ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# -// ^^^^^^^^^^ definition local 2 -// documentation -// > ```dart -// > String _someValue -// > ``` +// ^^^^^^^^^^ definition local 1 Bar(this._someValue); // ^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Bar#``(). -// documentation -// > ```dart -// > Bar Bar(String _someValue) -// > ``` -// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Bar# -// ^^^^ reference local 2 -// ^^^^^^^^^^ definition local 3 -// documentation -// > ```dart -// > String _someValue -// > ``` +// ^^^^^^^^^^ reference local 1 void someMethod() { // ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Bar#someMethod(). -// documentation -// > ```dart -// > void someMethod() -// > ``` _someValue = 'asdf'; -// ^^^^^^^^^^ reference local 2 +// ^^^^^^^^^^ reference local 1 print(_someValue); // ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). -// ^^^^^^^^^^ reference local 2 +// ^^^^^^^^^^ reference local 1 } } void main() { // ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/main(). -// documentation -// > ```dart -// > void main() -// > ``` more.loadLibrary().then((_) => { // ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/more. // ^^^^ reference scip-dart pub dart:async 2.19.0 dart:async/`future.dart`/Future#then(). -// ^ definition local 4 -// documentation -// > ```dart -// > dynamic _ -// > ``` +// ^ definition local 2 Bar('a').someMethod.call() -// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Bar# +// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Bar#``(). // ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Bar#someMethod(). }); - Foo()..value = false; -// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo# -// ^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value. + Foo(1, value: true, value2: 'asdf')..value = false; +// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``(). +// ^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``().(value) +// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``().(value2) +// ^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value. final someStr = 'someStr'; -// ^^^^^^^ definition local 5 -// documentation -// > ```dart -// > String someStr -// > ``` - Foo() -// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo# +// ^^^^^^^ definition local 3 + Foo(2, value: false, value2: 'some Val!') +// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``(). +// ^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``().(value) +// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``().(value2) ..value = true // ^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value. ..value2 = someStr // ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value2. -// ^^^^^^^ reference local 5 - ..value3 = 2.15 +// ^^^^^^^ reference local 3 + ..value3 = 2.15; // ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value3. + + more.test((_) => 'val'); +// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/more. +// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/test(). +// ^ definition local 4 } diff --git a/snapshots/output/basic-project/lib/relationships.dart b/snapshots/output/basic-project/lib/relationships.dart index 174afc43..11b0e1ff 100755 --- a/snapshots/output/basic-project/lib/relationships.dart +++ b/snapshots/output/basic-project/lib/relationships.dart @@ -1,81 +1,77 @@ abstract class Mammal { // definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/ // ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal# -// documentation -// > ```dart -// > abstract class Mammal -// > ``` - String get hierarchy; + String get someGetter; // ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# -// ^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal#hierarchy. -// documentation -// > ```dart -// > String get hierarchy -// > ``` +// ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal#`someGetter`. + set someSetter(String v); +// ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal#`someSetter`. +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^ definition local 0 + String field = ''; +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal#field. } abstract class Animal extends Mammal { // ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal# -// documentation -// > ```dart -// > abstract class Animal extends Mammal -// > ``` // relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal# implementation // ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal# String sound() => 'NOISE!'; // ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# // ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal#sound(). -// documentation -// > ```dart -// > String sound() -// > ``` + + @override +// ^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`annotations.dart`/override. + String field = 'asdf'; +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal#field. +// relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal#field. implementation reference } mixin SwimAction { // ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/SwimAction# -// documentation -// > ```dart -// > mixin SwimAction on Object -// > ``` void execute() => print('swimming...'); // ^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/SwimAction#execute(). -// documentation -// > ```dart -// > void execute() -// > ``` // ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). } class Dog extends Animal with SwimAction { // ^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Dog# -// documentation -// > ```dart -// > class Dog extends Animal with SwimAction -// > ``` // relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal# implementation // relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal# implementation // relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/SwimAction# implementation // ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal# // ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/SwimAction# + @override +// ^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`annotations.dart`/override. + String field = 'otherVal'; +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Dog#field. +// relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal#field. implementation reference +// relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal#field. implementation reference + @override // ^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`annotations.dart`/override. String sound() => 'woof'; // ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# // ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Dog#sound(). -// documentation -// > ```dart -// > String sound() -// > ``` // relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal#sound(). implementation reference @override // ^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`annotations.dart`/override. - String get hierarchy => 'dog.animal.mammal'; + String get someGetter => 'value'; // ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# -// ^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Dog#hierarchy. -// documentation -// > ```dart -// > String get hierarchy -// > ``` -// relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal#hierarchy. implementation reference +// ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Dog#`someGetter`. +// relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal#`someGetter`. implementation reference + + @override +// ^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`annotations.dart`/override. + set someSetter(String v) => print(v); +// ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Dog#`someSetter`. +// relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal#`someSetter`. implementation reference +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^ definition local 1 +// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^ reference local 1 } diff --git a/snapshots/output/basic-project/pubspec.yaml b/snapshots/output/basic-project/pubspec.yaml new file mode 100755 index 00000000..a38e70eb --- /dev/null +++ b/snapshots/output/basic-project/pubspec.yaml @@ -0,0 +1,10 @@ + name: dart_test +// definition scip-dart pub dart_test 1.0.0 `pubspec.yaml`/ + version: 1.0.0 + + environment: + sdk: '>=2.19.0 <3.0.0' + + dependencies: + test: ^1.24.3 +// ^^^^ reference scip-dart pub test 1.24.3 `pubspec.yaml`/ diff --git a/snapshots/output/basic-project/test/basic_test.dart b/snapshots/output/basic-project/test/basic_test.dart index e06a01f9..3ed37738 100755 --- a/snapshots/output/basic-project/test/basic_test.dart +++ b/snapshots/output/basic-project/test/basic_test.dart @@ -3,10 +3,6 @@ void main() { // ^^^^ definition scip-dart pub dart_test 1.0.0 test/`basic_test.dart`/main(). -// documentation -// > ```dart -// > void main() -// > ``` group('some test', () { // ^^^^^ reference scip-dart pub test_core 0.5.3 lib/`scaffolding.dart`/group(). test('equality', () { From e4b3522d8f92a7db9e5159cff0dfd02ee9baba9a Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Mon, 26 May 2025 21:31:59 -1000 Subject: [PATCH 12/16] simplier ci --- .github/workflows/ci.yaml | 8 +- .tool-versions | 2 +- Makefile | 12 +- pubspec.lock | 98 ++++----- snapshots/input/dart3-features/.tool-versions | 1 + snapshots/input/dart3-features/pubspec.lock | 2 +- snapshots/input/dart3-features/pubspec.yaml | 2 +- .../input/output/basic-project/lib/main.dart | 101 +++++++++ .../input/output/basic-project/lib/more.dart | 202 +++++++++++++++++ .../input/output/basic-project/lib/other.dart | 93 ++++++++ .../basic-project/lib/relationships.dart | 77 +++++++ .../input/output/basic-project/pubspec.yaml | 10 + .../output/basic-project/test/basic_test.dart | 14 ++ .../input/output/diagnostics/lib/main.dart | 67 ++++++ .../input/output/diagnostics/pubspec.yaml | 10 + snapshots/output/dart3-features/lib/main.dart | 204 +++--------------- snapshots/output/dart3-features/pubspec.yaml | 6 + snapshots/output/diagnostics/lib/main.dart | 17 +- tool/regen-snapshots.sh | 8 +- 19 files changed, 685 insertions(+), 249 deletions(-) create mode 100644 snapshots/input/dart3-features/.tool-versions create mode 100755 snapshots/input/output/basic-project/lib/main.dart create mode 100755 snapshots/input/output/basic-project/lib/more.dart create mode 100755 snapshots/input/output/basic-project/lib/other.dart create mode 100755 snapshots/input/output/basic-project/lib/relationships.dart create mode 100755 snapshots/input/output/basic-project/pubspec.yaml create mode 100755 snapshots/input/output/basic-project/test/basic_test.dart create mode 100755 snapshots/input/output/diagnostics/lib/main.dart create mode 100755 snapshots/input/output/diagnostics/pubspec.yaml create mode 100755 snapshots/output/dart3-features/pubspec.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c7b80e54..57ce6d0e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -23,7 +23,11 @@ jobs: strategy: fail-fast: false matrix: - dir: [basic-project, diagnostics, dart3-features] + dir: + - path: basic-project + - path: diagnostics + - path: dart3-features + sdk: 3.7.2 steps: - uses: actions/checkout@v4 - name: Install scip cli @@ -33,7 +37,7 @@ jobs: - uses: dart-lang/setup-dart@v1 with: - sdk: 2.19.6 + sdk: ${{ matrix.dir.sdk != null && matrix.dir.sdk || '2.19.6' }} - name: pub get scip-dart package run: dart pub get diff --git a/.tool-versions b/.tool-versions index ed696fba..e2f038d4 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1 +1 @@ -dart 3.7.2 +dart 2.19.6 diff --git a/Makefile b/Makefile index 03d56981..9931cbc2 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,15 @@ regen-snapshots: - ./tool/regen-snapshots.sh + dart run scip_dart ./snapshots/input/basic-project --index-pubspec + scip snapshot --to ./snapshots/output/basic-project + + dart run scip_dart ./snapshots/input/diagnostics --index-pubspec + scip snapshot --to ./snapshots/output/diagnostics + + asdf set dart 3.7.2 + dart pub upgrade + dart run scip_dart ./snapshots/input/dart3-features --index-pubspec + scip snapshot --to ./snapshots/output/dart3-features + asdf set dart 2.19.6 run: dart run scip_dart ./snapshots/input/staging-project --verbose diff --git a/pubspec.lock b/pubspec.lock index dc977b79..61d6d757 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -21,26 +21,26 @@ packages: dependency: "direct main" description: name: args - sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 + sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04 url: "https://pub.dev" source: hosted - version: "2.4.2" + version: "2.7.0" async: dependency: transitive description: name: async - sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb" url: "https://pub.dev" source: hosted - version: "2.11.0" + version: "2.13.0" build_config: dependency: transitive description: name: build_config - sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 + sha256: "4ae2de3e1e67ea270081eaee972e1bd8f027d459f249e0f1186730784c2e7e33" url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.1.2" chalk: dependency: "direct dev" description: @@ -61,26 +61,26 @@ packages: dependency: "direct main" description: name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" url: "https://pub.dev" source: hosted - version: "1.18.0" + version: "1.19.1" convert: dependency: transitive description: name: convert - sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.2" crypto: dependency: transitive description: name: crypto - sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.6" dart_dev: dependency: "direct dev" description: @@ -101,74 +101,74 @@ packages: dependency: transitive description: name: file - sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 url: "https://pub.dev" source: hosted - version: "6.1.4" + version: "7.0.1" fixnum: dependency: transitive description: name: fixnum - sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" glob: dependency: "direct dev" description: name: glob - sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + sha256: c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.3" io: dependency: transitive description: name: io - sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + sha256: dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.0.5" json_annotation: dependency: transitive description: name: json_annotation - sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" url: "https://pub.dev" source: hosted - version: "4.8.1" + version: "4.9.0" logging: dependency: transitive description: name: logging - sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.0" meta: dependency: transitive description: name: meta - sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394" url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "1.17.0" package_config: dependency: "direct main" description: name: package_config - sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + sha256: f096c55ebb7deb7e384101542bfba8c52696c1b56fca2eb62827989ef2353bbc url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.2.0" path: dependency: "direct main" description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.1" protobuf: dependency: "direct main" description: @@ -181,10 +181,10 @@ packages: dependency: transitive description: name: pub_semver - sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + sha256: "5bfcf68ca79ef689f8990d1160781b4bad40a3bd5e5218ad4076ddb7f4081585" url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.2.0" pubspec_lock_parse: dependency: "direct main" description: @@ -197,58 +197,58 @@ packages: dependency: "direct main" description: name: pubspec_parse - sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367 + sha256: "0560ba233314abbed0a48a2956f7f022cce7c3e1e73df540277da7544cad4082" url: "https://pub.dev" source: hosted - version: "1.2.3" + version: "1.5.0" source_span: dependency: transitive description: name: source_span - sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.10.1" stack_trace: dependency: transitive description: name: stack_trace - sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" url: "https://pub.dev" source: hosted - version: "1.11.1" + version: "1.12.1" string_scanner: dependency: transitive description: name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.4.1" term_glyph: dependency: transitive description: name: term_glyph - sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.2.2" typed_data: dependency: transitive description: name: typed_data - sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 url: "https://pub.dev" source: hosted - version: "1.3.2" + version: "1.4.0" watcher: dependency: transitive description: name: watcher - sha256: "6a7f46926b01ce81bfc339da6a7f20afbe7733eff9846f6d6a5466aa4c6667c0" + sha256: "69da27e49efa56a15f8afe8f4438c4ec02eff0a117df1b22ea4aad194fe1c104" url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "1.1.1" workiva_analysis_options: dependency: "direct dev" description: @@ -261,9 +261,9 @@ packages: dependency: transitive description: name: yaml - sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "3.1.3" sdks: - dart: ">=2.19.6 <3.0.0" + dart: ">=3.6.0 <4.0.0" diff --git a/snapshots/input/dart3-features/.tool-versions b/snapshots/input/dart3-features/.tool-versions new file mode 100644 index 00000000..ed696fba --- /dev/null +++ b/snapshots/input/dart3-features/.tool-versions @@ -0,0 +1 @@ +dart 3.7.2 diff --git a/snapshots/input/dart3-features/pubspec.lock b/snapshots/input/dart3-features/pubspec.lock index 752e1ef5..573410f7 100644 --- a/snapshots/input/dart3-features/pubspec.lock +++ b/snapshots/input/dart3-features/pubspec.lock @@ -2,4 +2,4 @@ # See https://dart.dev/tools/pub/glossary#lockfile packages: {} sdks: - dart: ">=2.19.6 <4.0.0" + dart: ">=3.0.0 <4.0.0" diff --git a/snapshots/input/dart3-features/pubspec.yaml b/snapshots/input/dart3-features/pubspec.yaml index 96c1a8c6..a61ac8bc 100644 --- a/snapshots/input/dart3-features/pubspec.yaml +++ b/snapshots/input/dart3-features/pubspec.yaml @@ -2,4 +2,4 @@ name: dart3_features version: 1.0.0 environment: - sdk: ">=2.19.6 <4.0.0" \ No newline at end of file + sdk: ">=3.0.0 <4.0.0" \ No newline at end of file diff --git a/snapshots/input/output/basic-project/lib/main.dart b/snapshots/input/output/basic-project/lib/main.dart new file mode 100755 index 00000000..e9933d30 --- /dev/null +++ b/snapshots/input/output/basic-project/lib/main.dart @@ -0,0 +1,101 @@ + import 'package:dart_test/other.dart'; +// definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/ + + /// This is a fib function + /// + /// Takes a number + /// Returns a number + int fib(int n) { +//^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# +// ^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/fib(). +// documentation +// > This is a fib function +// > Takes a number +// > Returns a number +// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# +// ^ definition local 0 + if (n <= 1) return 0; +// ^ reference local 0 + return fib(n - 1) + fib(n - 2); +// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/fib(). +// ^ reference local 0 +// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/fib(). +// ^ reference local 0 + } + + void print_fib(int a) { +// ^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/print_fib(). +// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# +// ^ definition local 1 + print(fib(a)); +// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/fib(). +// ^ reference local 1 + } + + final y = 'Hello'; +// ^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/y. + String capture() { +//^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/capture(). + return y; +// ^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/y. + } + + final capture_lambda = () => y; +// ^^^^^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/capture_lambda. +// ^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/y. + + void main() { +// ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/main(). + for (var i = 0; i <= 10; i++) {} +// ^ definition local 2 +// ^ reference local 2 +// ^ reference local 2 + + for (var i in [1, 2, 3]) { +// ^ definition local 3 + print(i); +// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^ reference local 3 + } + + var a = 0; +// ^ definition local 4 + a = 1; +// ^ reference local 4 + print_fib(a); +// ^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/print_fib(). +// ^ reference local 4 + } + + void forever() { +// ^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/forever(). + return forever(); +// ^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/forever(). + } + + class SomeLocalClass {} +// ^^^^^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/SomeLocalClass# + + /// Reference parameter: [value] +// ^^^^^ reference local 5 + /// Reference class: [SomeLocalClass] +// ^^^^^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/SomeLocalClass# + /// Reference external class: [Foo] +// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo# + /// Missing Reference: [IDontExist] + void someFunction(int value) { +// ^^^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/someFunction(). +// documentation +// > Reference parameter: [value] +// > Reference class: [SomeLocalClass] +// > Reference external class: [Foo] +// > Missing Reference: [IDontExist] +// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# +// ^^^^^ definition local 5 + Foo(1, value: true, value2: ''); +// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``(). +// ^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``().(value) +// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``().(value2) + } diff --git a/snapshots/input/output/basic-project/lib/more.dart b/snapshots/input/output/basic-project/lib/more.dart new file mode 100755 index 00000000..22bf7d7d --- /dev/null +++ b/snapshots/input/output/basic-project/lib/more.dart @@ -0,0 +1,202 @@ + import 'dart:math' as math; +// definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/ +// ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/math. + + enum AnimalType { +// ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# + cat, +// ^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#cat. + dog, +// ^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#dog. + bird, +// ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#bird. + } + + typedef SoundMaker = void Function(); +// ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/SoundMaker# + + mixin SleepMixin { +// ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/SleepMixin# + void sleep() { +// ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/SleepMixin#sleep(). + print('zzz...'); +// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). + } + } + + class Animal with SleepMixin { +// ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal# +// relationship scip-dart pub dart_test 1.0.0 lib/`more.dart`/SleepMixin# implementation +// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/SleepMixin# + String name; +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#name. + AnimalType type; +// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# +// ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#type. + SoundMaker? soundMaker; +// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/SoundMaker# +// ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#soundMaker. + + Animal(this.name, {required this.type}) { +// ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#``(). +// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#name. +// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#type. +// ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#``().(type) + print(AnimalType.values); +// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# + switch (type) { +// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#type. + case AnimalType.cat: +// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# +// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#cat. + soundMaker = () => print('Meow!'); +// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#soundMaker. +// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). + break; + case AnimalType.dog: +// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# +// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#dog. + soundMaker = () => print('Woof!'); +// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#soundMaker. +// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). + break; + case AnimalType.bird: +// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# +// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#bird. + soundMaker = () => print('Chirp!'); +// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#soundMaker. +// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). + break; + default: + soundMaker = () => print('Unknown animal type'); +// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#soundMaker. +// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). + } + } + + factory Animal.cat() => Animal('Timmy', type: AnimalType.cat); +// ^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#cat(). +// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#``(). +// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#``().(type) +// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# +// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#cat. + + void makeSound() { +// ^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#makeSound(). + soundMaker?.call(); +// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#soundMaker. + } + + @override +// ^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`annotations.dart`/override. + String toString() { +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#toString(). +// relationship scip-dart pub dart:core 2.19.0 dart:core/`object.dart`/Object#toString(). implementation reference + return '$name the $type'; +// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#name. +// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#type. + } + } + + int calculateSum(List numbers) { +//^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# +// ^^^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/calculateSum(). +// ^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`list.dart`/List# +// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# +// ^^^^^^^ definition local 0 + return numbers.reduce((value, element) => value + element); +// ^^^^^^^ reference local 0 +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`iterable.dart`/Iterable#reduce(). +// ^^^^^ definition local 1 +// ^^^^^^^ definition local 2 +// ^^^^^ reference local 1 +// ^^^^^^^ reference local 2 + } + + void main() { +// ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/main(). + List numbers = [1, 2, 3, 4, 5]; +// ^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`list.dart`/List# +// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# +// ^^^^^^^ definition local 3 + int sum = calculateSum(numbers); +// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# +// ^^^ definition local 4 +// ^^^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/calculateSum(). +// ^^^^^^^ reference local 3 + + Animal bird = Animal('Kitty', type: AnimalType.bird); +// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal# +// ^^^^ definition local 5 +// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#``(). +// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#``().(type) +// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# +// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#bird. + Animal dog = Animal('Buddy', type: AnimalType.dog); +// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal# +// ^^^ definition local 6 +// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#``(). +// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#``().(type) +// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# +// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#dog. + Animal cat = Animal.cat(); +// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal# +// ^^^ definition local 7 +// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal# +// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#cat(). + + bird.makeSound(); +// ^^^^ reference local 5 +// ^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#makeSound(). + bird.sleep(); +// ^^^^ reference local 5 +// ^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/SleepMixin#sleep(). + + dog.makeSound(); +// ^^^ reference local 6 +// ^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#makeSound(). + dog.sleep(); +// ^^^ reference local 6 +// ^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/SleepMixin#sleep(). + + cat.makeSound(); +// ^^^ reference local 7 +// ^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#makeSound(). + + print(bird); +// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^^^^ reference local 5 + print(dog); +// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^^^ reference local 6 + print('The sum of $numbers is $sum'); +// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^^^^^^^ reference local 3 +// ^^^ reference local 4 + + print(math.Rectangle(1,2,3,4)); +// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/math. +// ^^^^^^^^^ reference scip-dart pub dart:math 2.19.0 dart:math/`rectangle.dart`/Rectangle#``(). + + [1,2].reduce((a, b) => a + b); +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`iterable.dart`/Iterable#reduce(). +// ^ definition local 8 +// ^ definition local 9 +// ^ reference local 8 +// ^ reference local 9 + } + + void test(String Function(int) p) {} +// ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/test(). +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# +// ^ definition local 10 + void deepTest(String Function(void Function(String test)) p) {} +// ^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/deepTest(). +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^ definition local 11 diff --git a/snapshots/input/output/basic-project/lib/other.dart b/snapshots/input/output/basic-project/lib/other.dart new file mode 100755 index 00000000..30a16588 --- /dev/null +++ b/snapshots/input/output/basic-project/lib/other.dart @@ -0,0 +1,93 @@ + import 'more.dart' deferred as more; +// definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/ +// ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/more. + + class Foo { +// ^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo# + int _far; +// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# +// ^^^^ definition local 0 + bool value; +// ^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`bool.dart`/bool# +// ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value. + String value2; +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value2. + double? value3; +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`double.dart`/double# +// ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value3. + Foo( +// ^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``(). + this._far, { +// ^^^^ reference local 0 + required this.value, +// ^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value. +// ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``().(value) + required this.value2, +// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value2. +// ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``().(value2) + this.value3, +// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value3. +// ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``().(value3) + }) { + print(_far); +// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^^^^ reference local 0 + } + } + + class Bar { +// ^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Bar# + String _someValue; +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^^^^^^^^ definition local 1 + Bar(this._someValue); +// ^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Bar#``(). +// ^^^^^^^^^^ reference local 1 + + void someMethod() { +// ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Bar#someMethod(). + _someValue = 'asdf'; +// ^^^^^^^^^^ reference local 1 + print(_someValue); +// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^^^^^^^^^^ reference local 1 + } + } + + void main() { +// ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/main(). + more.loadLibrary().then((_) => { +// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/more. +// ^^^^ reference scip-dart pub dart:async 2.19.0 dart:async/`future.dart`/Future#then(). +// ^ definition local 2 + Bar('a').someMethod.call() +// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Bar#``(). +// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Bar#someMethod(). + }); + + Foo(1, value: true, value2: 'asdf')..value = false; +// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``(). +// ^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``().(value) +// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``().(value2) +// ^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value. + + final someStr = 'someStr'; +// ^^^^^^^ definition local 3 + Foo(2, value: false, value2: 'some Val!') +// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``(). +// ^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``().(value) +// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``().(value2) + ..value = true +// ^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value. + ..value2 = someStr +// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value2. +// ^^^^^^^ reference local 3 + ..value3 = 2.15; +// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value3. + + more.test((_) => 'val'); +// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/more. +// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/test(). +// ^ definition local 4 + } diff --git a/snapshots/input/output/basic-project/lib/relationships.dart b/snapshots/input/output/basic-project/lib/relationships.dart new file mode 100755 index 00000000..11b0e1ff --- /dev/null +++ b/snapshots/input/output/basic-project/lib/relationships.dart @@ -0,0 +1,77 @@ + abstract class Mammal { +// definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/ +// ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal# + String get someGetter; +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal#`someGetter`. + set someSetter(String v); +// ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal#`someSetter`. +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^ definition local 0 + String field = ''; +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal#field. + } + + abstract class Animal extends Mammal { +// ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal# +// relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal# implementation +// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal# + String sound() => 'NOISE!'; +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal#sound(). + + @override +// ^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`annotations.dart`/override. + String field = 'asdf'; +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal#field. +// relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal#field. implementation reference + } + + mixin SwimAction { +// ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/SwimAction# + void execute() => print('swimming...'); +// ^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/SwimAction#execute(). +// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). + } + + class Dog extends Animal with SwimAction { +// ^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Dog# +// relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal# implementation +// relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal# implementation +// relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/SwimAction# implementation +// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal# +// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/SwimAction# + @override +// ^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`annotations.dart`/override. + String field = 'otherVal'; +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Dog#field. +// relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal#field. implementation reference +// relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal#field. implementation reference + + @override +// ^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`annotations.dart`/override. + String sound() => 'woof'; +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Dog#sound(). +// relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal#sound(). implementation reference + + @override +// ^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`annotations.dart`/override. + String get someGetter => 'value'; +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Dog#`someGetter`. +// relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal#`someGetter`. implementation reference + + @override +// ^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`annotations.dart`/override. + set someSetter(String v) => print(v); +// ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Dog#`someSetter`. +// relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal#`someSetter`. implementation reference +// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^ definition local 1 +// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^ reference local 1 + } diff --git a/snapshots/input/output/basic-project/pubspec.yaml b/snapshots/input/output/basic-project/pubspec.yaml new file mode 100755 index 00000000..a38e70eb --- /dev/null +++ b/snapshots/input/output/basic-project/pubspec.yaml @@ -0,0 +1,10 @@ + name: dart_test +// definition scip-dart pub dart_test 1.0.0 `pubspec.yaml`/ + version: 1.0.0 + + environment: + sdk: '>=2.19.0 <3.0.0' + + dependencies: + test: ^1.24.3 +// ^^^^ reference scip-dart pub test 1.24.3 `pubspec.yaml`/ diff --git a/snapshots/input/output/basic-project/test/basic_test.dart b/snapshots/input/output/basic-project/test/basic_test.dart new file mode 100755 index 00000000..3ed37738 --- /dev/null +++ b/snapshots/input/output/basic-project/test/basic_test.dart @@ -0,0 +1,14 @@ + import 'package:test/test.dart'; +// definition scip-dart pub dart_test 1.0.0 test/`basic_test.dart`/ + + void main() { +// ^^^^ definition scip-dart pub dart_test 1.0.0 test/`basic_test.dart`/main(). + group('some test', () { +// ^^^^^ reference scip-dart pub test_core 0.5.3 lib/`scaffolding.dart`/group(). + test('equality', () { +// ^^^^ reference scip-dart pub test_core 0.5.3 lib/`scaffolding.dart`/test(). + expect(1, 1); +// ^^^^^^ reference scip-dart pub matcher 0.12.16 lib/src/expect/`expect.dart`/expect(). + }); + }); + } diff --git a/snapshots/input/output/diagnostics/lib/main.dart b/snapshots/input/output/diagnostics/lib/main.dart new file mode 100755 index 00000000..8697a36f --- /dev/null +++ b/snapshots/input/output/diagnostics/lib/main.dart @@ -0,0 +1,67 @@ + import 'dart:collection'; // unused import +// definition scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/ + + class _UnusedClass {} +// ^^^^^^^^^^^^ definition local 0 +// diagnostic Information: +// > The declaration '_UnusedClass' isn't referenced. + + void _unusedMethod() {} +// ^^^^^^^^^^^^^ definition local 1 +// diagnostic Information: +// > The declaration '_unusedMethod' isn't referenced. + + final _unusedTopLevelVariable = 'asdf'; +// ^^^^^^^^^^^^^^^^^^^^^^^ definition local 2 +// diagnostic Information: +// > The declaration '_unusedTopLevelVariable' isn't referenced. + + @Deprecated('This method is deprecated') +// ^^^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`annotations.dart`/Deprecated# + void deprecatedMethod() {} +// ^^^^^^^^^^^^^^^^ definition scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/deprecatedMethod(). + + void deprecatedParam({ +// ^^^^^^^^^^^^^^^ definition scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/deprecatedParam(). + @Deprecated('this param is deprecated') dynamic foobar +// ^^^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`annotations.dart`/Deprecated# +// ^^^^^^ definition scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/deprecatedParam().(foobar) + }) {} + + void main() { +// ^^^^ definition scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/main(). + final unusedVariable = 'asdf'; +// ^^^^^^^^^^^^^^ definition local 3 +// diagnostic Warning: +// > The value of the local variable 'unusedVariable' isn't used. + + final variableWithUnnecessaryDeclaration = 'asdf'; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ definition local 4 +// diagnostic Warning: +// > The value of the local variable 'variableWithUnnecessaryDeclaration' isn't used. + + // dead_code example + if (true) { } else { + print('This condition is never met!'); +// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). + } + + deprecatedMethod(); +// ^^^^^^^^^^^^^^^^ reference scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/deprecatedMethod(). +// diagnostic Information: +// > 'deprecatedMethod' is deprecated and shouldn't be used. This method is deprecated. + deprecatedParam(foobar: 2); +// ^^^^^^^^^^^^^^^ reference scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/deprecatedParam(). +// ^^^^^^ reference scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/deprecatedParam().(foobar) +// diagnostic Information: +// > 'foobar' is deprecated and shouldn't be used. this param is deprecated. + someDeprecatedFunc(); +// ^^^^^^^^^^^^^^^^^^ reference scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/someDeprecatedFunc(). +// diagnostic Information: +// > 'someDeprecatedFunc' is deprecated and shouldn't be used. + } + + @deprecated +// ^^^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`annotations.dart`/deprecated. + void someDeprecatedFunc() {} +// ^^^^^^^^^^^^^^^^^^ definition scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/someDeprecatedFunc(). diff --git a/snapshots/input/output/diagnostics/pubspec.yaml b/snapshots/input/output/diagnostics/pubspec.yaml new file mode 100755 index 00000000..f96b652d --- /dev/null +++ b/snapshots/input/output/diagnostics/pubspec.yaml @@ -0,0 +1,10 @@ + name: dart_test_diagnostics +// definition scip-dart pub dart_test_diagnostics 1.0.0 `pubspec.yaml`/ + version: 1.0.0 + + environment: + sdk: '>=2.19.0 <3.0.0' + dependencies: + lints: ^2.0.1 +// ^^^^^ reference scip-dart pub lints 2.0.1 `pubspec.yaml`/ + diff --git a/snapshots/output/dart3-features/lib/main.dart b/snapshots/output/dart3-features/lib/main.dart index 49093560..defef0b9 100755 --- a/snapshots/output/dart3-features/lib/main.dart +++ b/snapshots/output/dart3-features/lib/main.dart @@ -1,139 +1,63 @@ (String, int) userInfo(Map json) { // definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/ -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# -// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# +// ^^^^^^ reference scip-dart pub dart:core 3.7.0 dart:core/`string.dart`/String# +// ^^^ reference scip-dart pub dart:core 3.7.0 dart:core/`int.dart`/int# // ^^^^^^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/userInfo(). -// documentation -// > ```dart -// > (String, int) userInfo(Map json) -// > ``` -// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`map.dart`/Map# -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^ reference scip-dart pub dart:core 3.7.0 dart:core/`map.dart`/Map# +// ^^^^^^ reference scip-dart pub dart:core 3.7.0 dart:core/`string.dart`/String# // ^^^^ definition local 0 -// documentation -// > ```dart -// > Map json -// > ``` return (json['name'] as String, json['height'] as int); // ^^^^ reference local 0 -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +// ^^^^^^ reference scip-dart pub dart:core 3.7.0 dart:core/`string.dart`/String# // ^^^^ reference local 0 -// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# +// ^^^ reference scip-dart pub dart:core 3.7.0 dart:core/`int.dart`/int# } void parser(int charCode) { // ^^^^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/parser(). -// documentation -// > ```dart -// > void parser(int charCode) -// > ``` -// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# +// ^^^ reference scip-dart pub dart:core 3.7.0 dart:core/`int.dart`/int# // ^^^^^^^^ definition local 1 -// documentation -// > ```dart -// > int charCode -// > ``` const slash = 1; // ^^^^^ definition local 2 -// documentation -// > ```dart -// > int slash -// > ``` const star = 2; // ^^^^ definition local 3 -// documentation -// > ```dart -// > int star -// > ``` const plus = 3; // ^^^^ definition local 4 -// documentation -// > ```dart -// > int plus -// > ``` const minus = 4; // ^^^^^ definition local 5 -// documentation -// > ```dart -// > int minus -// > ``` final nextCharCode = 'a'; // ^^^^^^^^^^^^ definition local 6 -// documentation -// > ```dart -// > String nextCharCode -// > ``` -// diagnostic Warning: -// > The value of the local variable 'nextCharCode' isn't used. const digit0 = 0; // ^^^^^^ definition local 7 -// documentation -// > ```dart -// > int digit0 -// > ``` const digit9 = 9; // ^^^^^^ definition local 8 -// documentation -// > ```dart -// > int digit9 -// > ``` void skipComment() {} // ^^^^^^^^^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/skipComment(). -// documentation -// > ```dart -// > void skipComment() -// > ``` void operatorFn(int charCode) {} // ^^^^^^^^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/operatorFn(). -// documentation -// > ```dart -// > void operatorFn(int charCode) -// > ``` -// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# +// ^^^ reference scip-dart pub dart:core 3.7.0 dart:core/`int.dart`/int# // ^^^^^^^^ definition local 9 -// documentation -// > ```dart -// > int charCode -// > ``` void number() {} // ^^^^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/number(). -// documentation -// > ```dart -// > void number() -// > ``` void invalid() {} // ^^^^^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/invalid(). -// documentation -// > ```dart -// > void invalid() -// > ``` switch (charCode) { // ^^^^^^^^ reference local 1 case slash when nextCharCode == slash: // ^^^^^ reference local 2 +// ^^^^^^^^^^^^ reference local 6 +// ^^^^^ reference local 2 skipComment(); // ^^^^^^^^^^^ reference scip-dart pub dart3_features 1.0.0 lib/`main.dart`/skipComment(). case slash || star || plus || minus: // ^^^^^ reference local 2 -// diagnostic Error: -// > The operands of the operator '||' must be assignable to 'bool'. -// diagnostic Error: -// > The switch case expression type 'bool' must be a subtype of the switch expression type 'int'. -// diagnostic Error: -// > In constant expressions, operands of this operator must be of type 'bool'. // ^^^^ reference local 3 -// diagnostic Error: -// > The operands of the operator '||' must be assignable to 'bool'. // ^^^^ reference local 4 -// diagnostic Error: -// > The operands of the operator '||' must be assignable to 'bool'. // ^^^^^ reference local 5 -// diagnostic Error: -// > The operands of the operator '||' must be assignable to 'bool'. operatorFn(charCode); // ^^^^^^^^^^ reference scip-dart pub dart3_features 1.0.0 lib/`main.dart`/operatorFn(). // ^^^^^^^^ reference local 1 @@ -152,138 +76,60 @@ const six = 6; // ^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/six. -// documentation -// > ```dart -// > int six -// > ``` const msg = 'Feeling the Monday blues?'; // ^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/msg. -// documentation -// > ```dart -// > String msg -// > ``` String describeDate(DateTime dt) { -//^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# +//^^^^^^ reference scip-dart pub dart:core 3.7.0 dart:core/`string.dart`/String# // ^^^^^^^^^^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/describeDate(). -// documentation -// > ```dart -// > String describeDate(DateTime dt) -// > ``` -// ^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`date_time.dart`/DateTime# +// ^^^^^^^^ reference scip-dart pub dart:core 3.7.0 dart:core/`date_time.dart`/DateTime# // ^^ definition local 10 -// documentation -// > ```dart -// > DateTime dt -// > ``` const one = 1; // ^^^ definition local 11 -// documentation -// > ```dart -// > int one -// > ``` -// diagnostic Warning: -// > The value of the local variable 'one' isn't used. return switch (dt.weekday) { // ^^ reference local 10 -// ^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`date_time.dart`/DateTime#weekday. +// ^^^^^^^ reference scip-dart pub dart:core 3.7.0 dart:core/`date_time.dart`/DateTime#`weekday`. one => 'Feeling the Monday blues?', +// ^^^ reference local 11 7 || six => 'Enjoy the weekend!', +// ^^^ reference scip-dart pub dart3_features 1.0.0 lib/`main.dart`/six. _ => 'Hang in there.' }; } void main() { // ^^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/main(). -// documentation -// > ```dart -// > void main() -// > ``` var ( String name, -// definition local 12 -// documentation -// > ```dart -// > dynamic -// > ``` -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# -// ^^^^ definition local 13 -// documentation -// > ```dart -// > String name -// > ``` +// ^^^^^^ reference scip-dart pub dart:core 3.7.0 dart:core/`string.dart`/String# int height, -// ^^^ definition local 14 -// documentation -// > ```dart -// > String int -// > ``` -// diagnostic Error: -// > Expected to find ';'. -// diagnostic Warning: -// > The value of the local variable 'int' isn't used. -// reference local 12 -// diagnostic Error: -// > Expected an identifier. -// diagnostic Error: -// > Unexpected text ';'. -// diagnostic Error: -// > Expected to find ';'. +// ^^^ reference scip-dart pub dart:core 3.7.0 dart:core/`int.dart`/int# ) = userInfo({'name': 'Michael', 'height': 180}); -// reference local 12 -// diagnostic Error: -// > Expected an identifier. -// diagnostic Error: -// > Unexpected text ';'. -// reference local 12 -// diagnostic Error: -// > Expected an identifier. // ^^^^^^^^ reference scip-dart pub dart3_features 1.0.0 lib/`main.dart`/userInfo(). print('User $name is $height cm tall.'); -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). -// ^^^^ reference local 13 -// diagnostic Error: -// > The non-nullable local variable 'name' must be assigned before it can be used. +// ^^^^^ reference scip-dart pub dart:core 3.7.0 dart:core/`print.dart`/print(). +// ^^^^ reference local 12 +// ^^^^^^ reference local 13 final json = {'name': 'Michael', 'height': 180}; -// ^^^^ definition local 15 -// documentation -// > ```dart -// > Map json -// > ``` +// ^^^^ definition local 14 if (json case {'name': 'Michael', 'height': int h}) { -// ^^^^ reference local 15 -// diagnostic Error: -// > Conditions must have a static type of 'bool'. +// ^^^^ reference local 14 +// ^^^ reference scip-dart pub dart:core 3.7.0 dart:core/`int.dart`/int# print('Michael is $h cm tall.'); -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). +// ^^^^^ reference scip-dart pub dart:core 3.7.0 dart:core/`print.dart`/print(). +// ^ reference local 15 } } base class Foo {} // ^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/Foo# -// documentation -// > ```dart -// > class Foo -// > ``` final class Bar {} // ^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/Bar# -// documentation -// > ```dart -// > class Bar -// > ``` interface class Car {} // ^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/Car# -// documentation -// > ```dart -// > class Car -// > ``` sealed class Zar {} // ^^^ definition scip-dart pub dart3_features 1.0.0 lib/`main.dart`/Zar# -// documentation -// > ```dart -// > class Zar -// > ``` diff --git a/snapshots/output/dart3-features/pubspec.yaml b/snapshots/output/dart3-features/pubspec.yaml new file mode 100755 index 00000000..6433cbd9 --- /dev/null +++ b/snapshots/output/dart3-features/pubspec.yaml @@ -0,0 +1,6 @@ + name: dart3_features +// definition scip-dart pub dart3_features 1.0.0 `pubspec.yaml`/ + version: 1.0.0 + + environment: + sdk: ">=3.0.0 <4.0.0" diff --git a/snapshots/output/diagnostics/lib/main.dart b/snapshots/output/diagnostics/lib/main.dart index 37726460..8697a36f 100755 --- a/snapshots/output/diagnostics/lib/main.dart +++ b/snapshots/output/diagnostics/lib/main.dart @@ -32,22 +32,13 @@ // ^^^^ definition scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/main(). final unusedVariable = 'asdf'; // ^^^^^^^^^^^^^^ definition local 3 -// documentation -// > ```dart -// > String unusedVariable -// > ``` // diagnostic Warning: // > The value of the local variable 'unusedVariable' isn't used. - String variableWithUnecssaryDeclaration = 'asdf'; -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ definition local 4 -// documentation -// > ```dart -// > String variableWithUnecssaryDeclaration -// > ``` -// diagnostic Warning: -// > The value of the local variable 'variableWithUnecssaryDeclaration' isn't used. + final variableWithUnnecessaryDeclaration = 'asdf'; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ definition local 4 +// diagnostic Warning: +// > The value of the local variable 'variableWithUnnecessaryDeclaration' isn't used. // dead_code example if (true) { } else { diff --git a/tool/regen-snapshots.sh b/tool/regen-snapshots.sh index 07e7aa1d..09af58ae 100755 --- a/tool/regen-snapshots.sh +++ b/tool/regen-snapshots.sh @@ -1,5 +1,7 @@ #!/bin/bash +SCRIPT_DIR=$(realpath "$(dirname "$0")") + PROJECTS=( basic-project dart3-features @@ -7,6 +9,8 @@ PROJECTS=( ) for project in "${PROJECTS[@]}"; do - dart run scip_dart "./snapshots/input/$project" --index-pubspec - scip snapshot --to "./snapshots/output/$project/" + pushd "./snapshots/input/$project" > /dev/null || exit + dart run "$SCRIPT_DIR/../bin/scip_dart.dart" --index-pubspec + scip snapshot --to "../output/$project/" + popd > /dev/null || exit done \ No newline at end of file From baa39f71fe21e442e228a97a7d2ea9b4f1b29a76 Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Mon, 26 May 2025 21:32:50 -1000 Subject: [PATCH 13/16] fmt --- .github/workflows/ci.yaml | 10 +++++----- tool/regen-snapshots.sh | 16 ---------------- 2 files changed, 5 insertions(+), 21 deletions(-) delete mode 100755 tool/regen-snapshots.sh diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 57ce6d0e..e19e3ed7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -42,21 +42,21 @@ jobs: run: dart pub get - name: pub get - working-directory: ./snapshots/input/${{ matrix.dir }} + working-directory: ./snapshots/input/${{ matrix.dir.path }} run: dart pub get - name: Snapshots Diff Check run: | - dart run scip_dart ./snapshots/input/${{ matrix.dir }} --index-pubspec - ./scip snapshot --to ./snapshots/output/${{matrix.dir}} + dart run scip_dart ./snapshots/input/${{ matrix.dir.path }} --index-pubspec + ./scip snapshot --to ./snapshots/output/${{ matrix.dir.path }} - if [[ -z "$(git status --porcelain ./snapshots/output/${{ matrix.dir }})" ]]; + if [[ -z "$(git status --porcelain ./snapshots/output/${{ matrix.dir.path }})" ]]; then echo "No changes to snapshot files" else echo echo "Snapshot diff detected differences, run 'make regen-snapshots' to re-generate snapshots" - git --no-pager diff ./snapshots/output/${{ matrix.dir }} + git --no-pager diff ./snapshots/output/${{ matrix.dir.path }} echo exit 1 fi diff --git a/tool/regen-snapshots.sh b/tool/regen-snapshots.sh deleted file mode 100755 index 09af58ae..00000000 --- a/tool/regen-snapshots.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -SCRIPT_DIR=$(realpath "$(dirname "$0")") - -PROJECTS=( - basic-project - dart3-features - diagnostics -) - -for project in "${PROJECTS[@]}"; do - pushd "./snapshots/input/$project" > /dev/null || exit - dart run "$SCRIPT_DIR/../bin/scip_dart.dart" --index-pubspec - scip snapshot --to "../output/$project/" - popd > /dev/null || exit -done \ No newline at end of file From 05e5d07adeeed409a3cb670c4bb58f2cdd8cadbe Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Mon, 26 May 2025 21:37:19 -1000 Subject: [PATCH 14/16] remove lock --- .gitignore | 5 +- pubspec.lock | 269 --------------------------------------------------- 2 files changed, 4 insertions(+), 270 deletions(-) delete mode 100644 pubspec.lock diff --git a/.gitignore b/.gitignore index 15617b6a..c7fd9f7e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,7 @@ .DS_Store index.scip snapshots/input/staging-project/lib/** -snapshots/output/staging-project/lib/** \ No newline at end of file +snapshots/output/staging-project/lib/** + +# Temporary while we support both dart 2 and 3 +pubspec.lock \ No newline at end of file diff --git a/pubspec.lock b/pubspec.lock deleted file mode 100644 index 61d6d757..00000000 --- a/pubspec.lock +++ /dev/null @@ -1,269 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - _fe_analyzer_shared: - dependency: transitive - description: - name: _fe_analyzer_shared - sha256: ae92f5d747aee634b87f89d9946000c2de774be1d6ac3e58268224348cd0101a - url: "https://pub.dev" - source: hosted - version: "61.0.0" - analyzer: - dependency: "direct main" - description: - name: analyzer - sha256: ea3d8652bda62982addfd92fdc2d0214e5f82e43325104990d4f4c4a2a313562 - url: "https://pub.dev" - source: hosted - version: "5.13.0" - args: - dependency: "direct main" - description: - name: args - sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04 - url: "https://pub.dev" - source: hosted - version: "2.7.0" - async: - dependency: transitive - description: - name: async - sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb" - url: "https://pub.dev" - source: hosted - version: "2.13.0" - build_config: - dependency: transitive - description: - name: build_config - sha256: "4ae2de3e1e67ea270081eaee972e1bd8f027d459f249e0f1186730784c2e7e33" - url: "https://pub.dev" - source: hosted - version: "1.1.2" - chalk: - dependency: "direct dev" - description: - name: chalk - sha256: "53491e94aea65cddf07a63491384cd2018c1ccf188c973dbb935fbee9db609c8" - url: "https://pub.dev" - source: hosted - version: "1.2.1" - checked_yaml: - dependency: transitive - description: - name: checked_yaml - sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff - url: "https://pub.dev" - source: hosted - version: "2.0.3" - collection: - dependency: "direct main" - description: - name: collection - sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" - url: "https://pub.dev" - source: hosted - version: "1.19.1" - convert: - dependency: transitive - description: - name: convert - sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 - url: "https://pub.dev" - source: hosted - version: "3.1.2" - crypto: - dependency: transitive - description: - name: crypto - sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" - url: "https://pub.dev" - source: hosted - version: "3.0.6" - dart_dev: - dependency: "direct dev" - description: - name: dart_dev - sha256: c76722c5b0c7b2d86d5ba26ee15abba97073c48b01a1de681ce09192695b79d8 - url: "https://pub.dev" - source: hosted - version: "4.2.3" - dependency_validator: - dependency: "direct dev" - description: - name: dependency_validator - sha256: "3a23914cacac37d0cdce067d0576fce18bf5951338616f036a20604c97dba0f7" - url: "https://pub.dev" - source: hosted - version: "4.1.3" - file: - dependency: transitive - description: - name: file - sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 - url: "https://pub.dev" - source: hosted - version: "7.0.1" - fixnum: - dependency: transitive - description: - name: fixnum - sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be - url: "https://pub.dev" - source: hosted - version: "1.1.1" - glob: - dependency: "direct dev" - description: - name: glob - sha256: c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de - url: "https://pub.dev" - source: hosted - version: "2.1.3" - io: - dependency: transitive - description: - name: io - sha256: dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b - url: "https://pub.dev" - source: hosted - version: "1.0.5" - json_annotation: - dependency: transitive - description: - name: json_annotation - sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" - url: "https://pub.dev" - source: hosted - version: "4.9.0" - logging: - dependency: transitive - description: - name: logging - sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 - url: "https://pub.dev" - source: hosted - version: "1.3.0" - meta: - dependency: transitive - description: - name: meta - sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394" - url: "https://pub.dev" - source: hosted - version: "1.17.0" - package_config: - dependency: "direct main" - description: - name: package_config - sha256: f096c55ebb7deb7e384101542bfba8c52696c1b56fca2eb62827989ef2353bbc - url: "https://pub.dev" - source: hosted - version: "2.2.0" - path: - dependency: "direct main" - description: - name: path - sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" - url: "https://pub.dev" - source: hosted - version: "1.9.1" - protobuf: - dependency: "direct main" - description: - name: protobuf - sha256: "68645b24e0716782e58948f8467fd42a880f255096a821f9e7d0ec625b00c84d" - url: "https://pub.dev" - source: hosted - version: "3.1.0" - pub_semver: - dependency: transitive - description: - name: pub_semver - sha256: "5bfcf68ca79ef689f8990d1160781b4bad40a3bd5e5218ad4076ddb7f4081585" - url: "https://pub.dev" - source: hosted - version: "2.2.0" - pubspec_lock_parse: - dependency: "direct main" - description: - name: pubspec_lock_parse - sha256: "020cb470287124c936c30ebfc2f927b287f275b7bf7fc2ab11577e592c017764" - url: "https://pub.dev" - source: hosted - version: "2.2.0" - pubspec_parse: - dependency: "direct main" - description: - name: pubspec_parse - sha256: "0560ba233314abbed0a48a2956f7f022cce7c3e1e73df540277da7544cad4082" - url: "https://pub.dev" - source: hosted - version: "1.5.0" - source_span: - dependency: transitive - description: - name: source_span - sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" - url: "https://pub.dev" - source: hosted - version: "1.10.1" - stack_trace: - dependency: transitive - description: - name: stack_trace - sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" - url: "https://pub.dev" - source: hosted - version: "1.12.1" - string_scanner: - dependency: transitive - description: - name: string_scanner - sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" - url: "https://pub.dev" - source: hosted - version: "1.4.1" - term_glyph: - dependency: transitive - description: - name: term_glyph - sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" - url: "https://pub.dev" - source: hosted - version: "1.2.2" - typed_data: - dependency: transitive - description: - name: typed_data - sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 - url: "https://pub.dev" - source: hosted - version: "1.4.0" - watcher: - dependency: transitive - description: - name: watcher - sha256: "69da27e49efa56a15f8afe8f4438c4ec02eff0a117df1b22ea4aad194fe1c104" - url: "https://pub.dev" - source: hosted - version: "1.1.1" - workiva_analysis_options: - dependency: "direct dev" - description: - name: workiva_analysis_options - sha256: "0a3c7880dfa23aa24ca8dcefe9906c5dccadb4cbd5ce8e9a98f8d83a877a2fa7" - url: "https://pub.dev" - source: hosted - version: "1.4.3" - yaml: - dependency: transitive - description: - name: yaml - sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce - url: "https://pub.dev" - source: hosted - version: "3.1.3" -sdks: - dart: ">=3.6.0 <4.0.0" From cd2578d234280443ce3d6f89bcdb4309277b2bc1 Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Mon, 26 May 2025 21:39:07 -1000 Subject: [PATCH 15/16] removed accidental commit --- .../input/output/basic-project/lib/main.dart | 101 --------- .../input/output/basic-project/lib/more.dart | 202 ------------------ .../input/output/basic-project/lib/other.dart | 93 -------- .../basic-project/lib/relationships.dart | 77 ------- .../input/output/basic-project/pubspec.yaml | 10 - .../output/basic-project/test/basic_test.dart | 14 -- .../input/output/diagnostics/lib/main.dart | 67 ------ .../input/output/diagnostics/pubspec.yaml | 10 - 8 files changed, 574 deletions(-) delete mode 100755 snapshots/input/output/basic-project/lib/main.dart delete mode 100755 snapshots/input/output/basic-project/lib/more.dart delete mode 100755 snapshots/input/output/basic-project/lib/other.dart delete mode 100755 snapshots/input/output/basic-project/lib/relationships.dart delete mode 100755 snapshots/input/output/basic-project/pubspec.yaml delete mode 100755 snapshots/input/output/basic-project/test/basic_test.dart delete mode 100755 snapshots/input/output/diagnostics/lib/main.dart delete mode 100755 snapshots/input/output/diagnostics/pubspec.yaml diff --git a/snapshots/input/output/basic-project/lib/main.dart b/snapshots/input/output/basic-project/lib/main.dart deleted file mode 100755 index e9933d30..00000000 --- a/snapshots/input/output/basic-project/lib/main.dart +++ /dev/null @@ -1,101 +0,0 @@ - import 'package:dart_test/other.dart'; -// definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/ - - /// This is a fib function - /// - /// Takes a number - /// Returns a number - int fib(int n) { -//^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# -// ^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/fib(). -// documentation -// > This is a fib function -// > Takes a number -// > Returns a number -// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# -// ^ definition local 0 - if (n <= 1) return 0; -// ^ reference local 0 - return fib(n - 1) + fib(n - 2); -// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/fib(). -// ^ reference local 0 -// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/fib(). -// ^ reference local 0 - } - - void print_fib(int a) { -// ^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/print_fib(). -// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# -// ^ definition local 1 - print(fib(a)); -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). -// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/fib(). -// ^ reference local 1 - } - - final y = 'Hello'; -// ^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/y. - String capture() { -//^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# -// ^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/capture(). - return y; -// ^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/y. - } - - final capture_lambda = () => y; -// ^^^^^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/capture_lambda. -// ^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/y. - - void main() { -// ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/main(). - for (var i = 0; i <= 10; i++) {} -// ^ definition local 2 -// ^ reference local 2 -// ^ reference local 2 - - for (var i in [1, 2, 3]) { -// ^ definition local 3 - print(i); -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). -// ^ reference local 3 - } - - var a = 0; -// ^ definition local 4 - a = 1; -// ^ reference local 4 - print_fib(a); -// ^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/print_fib(). -// ^ reference local 4 - } - - void forever() { -// ^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/forever(). - return forever(); -// ^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/forever(). - } - - class SomeLocalClass {} -// ^^^^^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/SomeLocalClass# - - /// Reference parameter: [value] -// ^^^^^ reference local 5 - /// Reference class: [SomeLocalClass] -// ^^^^^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`main.dart`/SomeLocalClass# - /// Reference external class: [Foo] -// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo# - /// Missing Reference: [IDontExist] - void someFunction(int value) { -// ^^^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`main.dart`/someFunction(). -// documentation -// > Reference parameter: [value] -// > Reference class: [SomeLocalClass] -// > Reference external class: [Foo] -// > Missing Reference: [IDontExist] -// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# -// ^^^^^ definition local 5 - Foo(1, value: true, value2: ''); -// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``(). -// ^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``().(value) -// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``().(value2) - } diff --git a/snapshots/input/output/basic-project/lib/more.dart b/snapshots/input/output/basic-project/lib/more.dart deleted file mode 100755 index 22bf7d7d..00000000 --- a/snapshots/input/output/basic-project/lib/more.dart +++ /dev/null @@ -1,202 +0,0 @@ - import 'dart:math' as math; -// definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/ -// ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/math. - - enum AnimalType { -// ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# - cat, -// ^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#cat. - dog, -// ^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#dog. - bird, -// ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#bird. - } - - typedef SoundMaker = void Function(); -// ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/SoundMaker# - - mixin SleepMixin { -// ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/SleepMixin# - void sleep() { -// ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/SleepMixin#sleep(). - print('zzz...'); -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). - } - } - - class Animal with SleepMixin { -// ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal# -// relationship scip-dart pub dart_test 1.0.0 lib/`more.dart`/SleepMixin# implementation -// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/SleepMixin# - String name; -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# -// ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#name. - AnimalType type; -// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# -// ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#type. - SoundMaker? soundMaker; -// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/SoundMaker# -// ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#soundMaker. - - Animal(this.name, {required this.type}) { -// ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#``(). -// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#name. -// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#type. -// ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#``().(type) - print(AnimalType.values); -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). -// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# - switch (type) { -// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#type. - case AnimalType.cat: -// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# -// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#cat. - soundMaker = () => print('Meow!'); -// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#soundMaker. -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). - break; - case AnimalType.dog: -// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# -// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#dog. - soundMaker = () => print('Woof!'); -// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#soundMaker. -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). - break; - case AnimalType.bird: -// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# -// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#bird. - soundMaker = () => print('Chirp!'); -// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#soundMaker. -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). - break; - default: - soundMaker = () => print('Unknown animal type'); -// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#soundMaker. -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). - } - } - - factory Animal.cat() => Animal('Timmy', type: AnimalType.cat); -// ^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#cat(). -// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#``(). -// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#``().(type) -// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# -// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#cat. - - void makeSound() { -// ^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#makeSound(). - soundMaker?.call(); -// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#soundMaker. - } - - @override -// ^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`annotations.dart`/override. - String toString() { -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# -// ^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#toString(). -// relationship scip-dart pub dart:core 2.19.0 dart:core/`object.dart`/Object#toString(). implementation reference - return '$name the $type'; -// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#name. -// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#type. - } - } - - int calculateSum(List numbers) { -//^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# -// ^^^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/calculateSum(). -// ^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`list.dart`/List# -// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# -// ^^^^^^^ definition local 0 - return numbers.reduce((value, element) => value + element); -// ^^^^^^^ reference local 0 -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`iterable.dart`/Iterable#reduce(). -// ^^^^^ definition local 1 -// ^^^^^^^ definition local 2 -// ^^^^^ reference local 1 -// ^^^^^^^ reference local 2 - } - - void main() { -// ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/main(). - List numbers = [1, 2, 3, 4, 5]; -// ^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`list.dart`/List# -// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# -// ^^^^^^^ definition local 3 - int sum = calculateSum(numbers); -// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# -// ^^^ definition local 4 -// ^^^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/calculateSum(). -// ^^^^^^^ reference local 3 - - Animal bird = Animal('Kitty', type: AnimalType.bird); -// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal# -// ^^^^ definition local 5 -// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#``(). -// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#``().(type) -// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# -// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#bird. - Animal dog = Animal('Buddy', type: AnimalType.dog); -// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal# -// ^^^ definition local 6 -// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#``(). -// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#``().(type) -// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType# -// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/AnimalType#dog. - Animal cat = Animal.cat(); -// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal# -// ^^^ definition local 7 -// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal# -// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#cat(). - - bird.makeSound(); -// ^^^^ reference local 5 -// ^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#makeSound(). - bird.sleep(); -// ^^^^ reference local 5 -// ^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/SleepMixin#sleep(). - - dog.makeSound(); -// ^^^ reference local 6 -// ^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#makeSound(). - dog.sleep(); -// ^^^ reference local 6 -// ^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/SleepMixin#sleep(). - - cat.makeSound(); -// ^^^ reference local 7 -// ^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/Animal#makeSound(). - - print(bird); -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). -// ^^^^ reference local 5 - print(dog); -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). -// ^^^ reference local 6 - print('The sum of $numbers is $sum'); -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). -// ^^^^^^^ reference local 3 -// ^^^ reference local 4 - - print(math.Rectangle(1,2,3,4)); -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). -// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/math. -// ^^^^^^^^^ reference scip-dart pub dart:math 2.19.0 dart:math/`rectangle.dart`/Rectangle#``(). - - [1,2].reduce((a, b) => a + b); -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`iterable.dart`/Iterable#reduce(). -// ^ definition local 8 -// ^ definition local 9 -// ^ reference local 8 -// ^ reference local 9 - } - - void test(String Function(int) p) {} -// ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/test(). -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# -// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# -// ^ definition local 10 - void deepTest(String Function(void Function(String test)) p) {} -// ^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`more.dart`/deepTest(). -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# -// ^ definition local 11 diff --git a/snapshots/input/output/basic-project/lib/other.dart b/snapshots/input/output/basic-project/lib/other.dart deleted file mode 100755 index 30a16588..00000000 --- a/snapshots/input/output/basic-project/lib/other.dart +++ /dev/null @@ -1,93 +0,0 @@ - import 'more.dart' deferred as more; -// definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/ -// ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/more. - - class Foo { -// ^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo# - int _far; -// ^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`int.dart`/int# -// ^^^^ definition local 0 - bool value; -// ^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`bool.dart`/bool# -// ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value. - String value2; -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# -// ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value2. - double? value3; -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`double.dart`/double# -// ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value3. - Foo( -// ^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``(). - this._far, { -// ^^^^ reference local 0 - required this.value, -// ^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value. -// ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``().(value) - required this.value2, -// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value2. -// ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``().(value2) - this.value3, -// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value3. -// ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``().(value3) - }) { - print(_far); -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). -// ^^^^ reference local 0 - } - } - - class Bar { -// ^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Bar# - String _someValue; -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# -// ^^^^^^^^^^ definition local 1 - Bar(this._someValue); -// ^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Bar#``(). -// ^^^^^^^^^^ reference local 1 - - void someMethod() { -// ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/Bar#someMethod(). - _someValue = 'asdf'; -// ^^^^^^^^^^ reference local 1 - print(_someValue); -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). -// ^^^^^^^^^^ reference local 1 - } - } - - void main() { -// ^^^^ definition scip-dart pub dart_test 1.0.0 lib/`other.dart`/main(). - more.loadLibrary().then((_) => { -// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/more. -// ^^^^ reference scip-dart pub dart:async 2.19.0 dart:async/`future.dart`/Future#then(). -// ^ definition local 2 - Bar('a').someMethod.call() -// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Bar#``(). -// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Bar#someMethod(). - }); - - Foo(1, value: true, value2: 'asdf')..value = false; -// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``(). -// ^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``().(value) -// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``().(value2) -// ^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value. - - final someStr = 'someStr'; -// ^^^^^^^ definition local 3 - Foo(2, value: false, value2: 'some Val!') -// ^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``(). -// ^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``().(value) -// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#``().(value2) - ..value = true -// ^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value. - ..value2 = someStr -// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value2. -// ^^^^^^^ reference local 3 - ..value3 = 2.15; -// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/Foo#value3. - - more.test((_) => 'val'); -// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`other.dart`/more. -// ^^^^ reference scip-dart pub dart_test 1.0.0 lib/`more.dart`/test(). -// ^ definition local 4 - } diff --git a/snapshots/input/output/basic-project/lib/relationships.dart b/snapshots/input/output/basic-project/lib/relationships.dart deleted file mode 100755 index 11b0e1ff..00000000 --- a/snapshots/input/output/basic-project/lib/relationships.dart +++ /dev/null @@ -1,77 +0,0 @@ - abstract class Mammal { -// definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/ -// ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal# - String get someGetter; -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# -// ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal#`someGetter`. - set someSetter(String v); -// ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal#`someSetter`. -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# -// ^ definition local 0 - String field = ''; -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# -// ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal#field. - } - - abstract class Animal extends Mammal { -// ^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal# -// relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal# implementation -// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal# - String sound() => 'NOISE!'; -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# -// ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal#sound(). - - @override -// ^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`annotations.dart`/override. - String field = 'asdf'; -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# -// ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal#field. -// relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal#field. implementation reference - } - - mixin SwimAction { -// ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/SwimAction# - void execute() => print('swimming...'); -// ^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/SwimAction#execute(). -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). - } - - class Dog extends Animal with SwimAction { -// ^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Dog# -// relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal# implementation -// relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal# implementation -// relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/SwimAction# implementation -// ^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal# -// ^^^^^^^^^^ reference scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/SwimAction# - @override -// ^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`annotations.dart`/override. - String field = 'otherVal'; -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# -// ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Dog#field. -// relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal#field. implementation reference -// relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal#field. implementation reference - - @override -// ^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`annotations.dart`/override. - String sound() => 'woof'; -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# -// ^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Dog#sound(). -// relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Animal#sound(). implementation reference - - @override -// ^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`annotations.dart`/override. - String get someGetter => 'value'; -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# -// ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Dog#`someGetter`. -// relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal#`someGetter`. implementation reference - - @override -// ^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`annotations.dart`/override. - set someSetter(String v) => print(v); -// ^^^^^^^^^^ definition scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Dog#`someSetter`. -// relationship scip-dart pub dart_test 1.0.0 lib/`relationships.dart`/Mammal#`someSetter`. implementation reference -// ^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`string.dart`/String# -// ^ definition local 1 -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). -// ^ reference local 1 - } diff --git a/snapshots/input/output/basic-project/pubspec.yaml b/snapshots/input/output/basic-project/pubspec.yaml deleted file mode 100755 index a38e70eb..00000000 --- a/snapshots/input/output/basic-project/pubspec.yaml +++ /dev/null @@ -1,10 +0,0 @@ - name: dart_test -// definition scip-dart pub dart_test 1.0.0 `pubspec.yaml`/ - version: 1.0.0 - - environment: - sdk: '>=2.19.0 <3.0.0' - - dependencies: - test: ^1.24.3 -// ^^^^ reference scip-dart pub test 1.24.3 `pubspec.yaml`/ diff --git a/snapshots/input/output/basic-project/test/basic_test.dart b/snapshots/input/output/basic-project/test/basic_test.dart deleted file mode 100755 index 3ed37738..00000000 --- a/snapshots/input/output/basic-project/test/basic_test.dart +++ /dev/null @@ -1,14 +0,0 @@ - import 'package:test/test.dart'; -// definition scip-dart pub dart_test 1.0.0 test/`basic_test.dart`/ - - void main() { -// ^^^^ definition scip-dart pub dart_test 1.0.0 test/`basic_test.dart`/main(). - group('some test', () { -// ^^^^^ reference scip-dart pub test_core 0.5.3 lib/`scaffolding.dart`/group(). - test('equality', () { -// ^^^^ reference scip-dart pub test_core 0.5.3 lib/`scaffolding.dart`/test(). - expect(1, 1); -// ^^^^^^ reference scip-dart pub matcher 0.12.16 lib/src/expect/`expect.dart`/expect(). - }); - }); - } diff --git a/snapshots/input/output/diagnostics/lib/main.dart b/snapshots/input/output/diagnostics/lib/main.dart deleted file mode 100755 index 8697a36f..00000000 --- a/snapshots/input/output/diagnostics/lib/main.dart +++ /dev/null @@ -1,67 +0,0 @@ - import 'dart:collection'; // unused import -// definition scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/ - - class _UnusedClass {} -// ^^^^^^^^^^^^ definition local 0 -// diagnostic Information: -// > The declaration '_UnusedClass' isn't referenced. - - void _unusedMethod() {} -// ^^^^^^^^^^^^^ definition local 1 -// diagnostic Information: -// > The declaration '_unusedMethod' isn't referenced. - - final _unusedTopLevelVariable = 'asdf'; -// ^^^^^^^^^^^^^^^^^^^^^^^ definition local 2 -// diagnostic Information: -// > The declaration '_unusedTopLevelVariable' isn't referenced. - - @Deprecated('This method is deprecated') -// ^^^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`annotations.dart`/Deprecated# - void deprecatedMethod() {} -// ^^^^^^^^^^^^^^^^ definition scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/deprecatedMethod(). - - void deprecatedParam({ -// ^^^^^^^^^^^^^^^ definition scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/deprecatedParam(). - @Deprecated('this param is deprecated') dynamic foobar -// ^^^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`annotations.dart`/Deprecated# -// ^^^^^^ definition scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/deprecatedParam().(foobar) - }) {} - - void main() { -// ^^^^ definition scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/main(). - final unusedVariable = 'asdf'; -// ^^^^^^^^^^^^^^ definition local 3 -// diagnostic Warning: -// > The value of the local variable 'unusedVariable' isn't used. - - final variableWithUnnecessaryDeclaration = 'asdf'; -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ definition local 4 -// diagnostic Warning: -// > The value of the local variable 'variableWithUnnecessaryDeclaration' isn't used. - - // dead_code example - if (true) { } else { - print('This condition is never met!'); -// ^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`print.dart`/print(). - } - - deprecatedMethod(); -// ^^^^^^^^^^^^^^^^ reference scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/deprecatedMethod(). -// diagnostic Information: -// > 'deprecatedMethod' is deprecated and shouldn't be used. This method is deprecated. - deprecatedParam(foobar: 2); -// ^^^^^^^^^^^^^^^ reference scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/deprecatedParam(). -// ^^^^^^ reference scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/deprecatedParam().(foobar) -// diagnostic Information: -// > 'foobar' is deprecated and shouldn't be used. this param is deprecated. - someDeprecatedFunc(); -// ^^^^^^^^^^^^^^^^^^ reference scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/someDeprecatedFunc(). -// diagnostic Information: -// > 'someDeprecatedFunc' is deprecated and shouldn't be used. - } - - @deprecated -// ^^^^^^^^^^ reference scip-dart pub dart:core 2.19.0 dart:core/`annotations.dart`/deprecated. - void someDeprecatedFunc() {} -// ^^^^^^^^^^^^^^^^^^ definition scip-dart pub dart_test_diagnostics 1.0.0 lib/`main.dart`/someDeprecatedFunc(). diff --git a/snapshots/input/output/diagnostics/pubspec.yaml b/snapshots/input/output/diagnostics/pubspec.yaml deleted file mode 100755 index f96b652d..00000000 --- a/snapshots/input/output/diagnostics/pubspec.yaml +++ /dev/null @@ -1,10 +0,0 @@ - name: dart_test_diagnostics -// definition scip-dart pub dart_test_diagnostics 1.0.0 `pubspec.yaml`/ - version: 1.0.0 - - environment: - sdk: '>=2.19.0 <3.0.0' - dependencies: - lints: ^2.0.1 -// ^^^^^ reference scip-dart pub lints 2.0.1 `pubspec.yaml`/ - From 9a9001060c7daa5512f1d50347b1092bddf85ffe Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Mon, 26 May 2025 21:40:46 -1000 Subject: [PATCH 16/16] minor fmt --- snapshots/input/dart3-features/.tool-versions | 1 - 1 file changed, 1 deletion(-) delete mode 100644 snapshots/input/dart3-features/.tool-versions diff --git a/snapshots/input/dart3-features/.tool-versions b/snapshots/input/dart3-features/.tool-versions deleted file mode 100644 index ed696fba..00000000 --- a/snapshots/input/dart3-features/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -dart 3.7.2