From 4df45d903eab6fc14ee6fe8c5dfeace28ef7e648 Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Tue, 18 Apr 2023 12:19:09 -0600 Subject: [PATCH 1/6] updates for pub publish --- CHANGELOG.md | 5 +++++ README.md | 12 ++---------- dart_dependency_validator.yaml | 2 ++ pubspec.yaml | 6 +----- 4 files changed, 10 insertions(+), 15 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 dart_dependency_validator.yaml diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..14496be5 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,5 @@ +# Changelog + +## 1.0.6 + +- Initial open sourcing of repo \ No newline at end of file diff --git a/README.md b/README.md index 9ac01ddc..903148e2 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Designed to be a replacement for [lsif_indexer](https://github.com/Workiva/lsif_ ## Installation ```sh -dart pub global activate --hosted-url https://pub.workiva.org scip_dart +dart pub global activate scip_dart ``` ## Usage @@ -40,12 +40,4 @@ Analysis can be uploaded to sourcegraph using the [src cli](https://docs.sourceg ```sh src code-intl upload -file=index.scip -github-token="" -``` - -## Design Philosophy - -Scip is a fairly simple file format. Much of it boils down to finding every declaration in a source file, and creating a unique, but consistent string for it. This is called a `symbol`. Then the idea is to search the source code for every reference, and generate that same `symbol` we created before, for the references declaration. After this is done, we should have a large mapping of every reference, and declaration which allows external tools to preform code navigation on the entities within the codebase. - -While this is simple in concept, in practice, parsing ast, and generating these symbols is edge case hell. Instead of expecting full coverage on everything, in its spike state, `scip-dart` will fail silently on unknown cases (this silent failing can be turned off with the `--verbose/-v` flag). The reason for this is that an incomplete scip index is still helpful, but a completely failed indexing is not. - -Failures in running `scip-dart` will be treated with higher priority than full coverage of symbols. \ No newline at end of file +``` \ No newline at end of file diff --git a/dart_dependency_validator.yaml b/dart_dependency_validator.yaml new file mode 100644 index 00000000..9d1d47e7 --- /dev/null +++ b/dart_dependency_validator.yaml @@ -0,0 +1,2 @@ +exclude: + - snapshots/** \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index f982a164..429410e9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -20,8 +20,4 @@ dependencies: dev_dependencies: dependency_validator: ^3.2.2 dart_dev: '>=3.9.2 <5.0.0' - glob: ^2.1.1 - -dependency_validator: - exclude: - - snapshots/** \ No newline at end of file + glob: ^2.1.1 \ No newline at end of file From ec5e755cd0ac9f854c47fcf26289c8705637ace4 Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Tue, 18 Apr 2023 12:21:30 -0600 Subject: [PATCH 2/6] fixed gha action --- .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 5f0ef2c3..cf5fc4b7 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -55,7 +55,7 @@ jobs: # Setup scip-dart - uses: actions/checkout@v3 - uses: dart-lang/setup-dart@v1 - - uses: Workiva/gha-dart/pub-get@master + - uses: dart pub get # Setup repo to run on - uses: actions/checkout@v3 From ab0b985fa618ea402d42cc06a0e4a4d712735241 Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Tue, 18 Apr 2023 12:23:36 -0600 Subject: [PATCH 3/6] fixed runs-on for checks jobs --- .github/workflows/checks.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 99e95591..75727209 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -5,7 +5,7 @@ on: jobs: format: - runs-on: workiva-runner-dev + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: dart-lang/setup-dart@v1 @@ -15,7 +15,7 @@ jobs: - run: dart run dart_dev format dependency-validator: - runs-on: workiva-runner-dev + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: dart-lang/setup-dart@v1 From 1f3d84b93e1e3371760510e8e89d1c7a1daf8e89 Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Tue, 18 Apr 2023 12:25:11 -0600 Subject: [PATCH 4/6] fixed incorrect uses key --- .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 cf5fc4b7..876ae095 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -55,7 +55,7 @@ jobs: # Setup scip-dart - uses: actions/checkout@v3 - uses: dart-lang/setup-dart@v1 - - uses: dart pub get + - run: dart pub get # Setup repo to run on - uses: actions/checkout@v3 From 7e4a7451d2147ce79a7d5cc8b2b96cf411e57534 Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Tue, 18 Apr 2023 12:30:12 -0600 Subject: [PATCH 5/6] no-op dockerfile --- Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b2595a19..03b4f7fa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1 +1,5 @@ -FROM drydock-prod.workiva.net/workiva/dart_build_image:3 as build \ No newline at end of file +FROM google/dart:2 +WORKDIR /build/ +ADD pubspec.yaml /build +RUN dart pub get +FROM scratch \ No newline at end of file From 9c1433fa3ff0af4aa46d61aa5ef7cd2dab5f35d5 Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Tue, 18 Apr 2023 12:32:03 -0600 Subject: [PATCH 6/6] reverted changes to dockerfile --- Dockerfile | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 03b4f7fa..b2595a19 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1 @@ -FROM google/dart:2 -WORKDIR /build/ -ADD pubspec.yaml /build -RUN dart pub get -FROM scratch \ No newline at end of file +FROM drydock-prod.workiva.net/workiva/dart_build_image:3 as build \ No newline at end of file