Skip to content

Commit

Permalink
Fix protoc_plugin publish errors and warnings (#475)
Browse files Browse the repository at this point in the history
- Set Dart SDK lower bound to 2.12.0-0
- Add missing dev dependencies
- Force tests to run in unsound mode until all sources are migrated
  • Loading branch information
iinozemtsev committed Feb 11, 2021
1 parent eb45463 commit d53d2bb
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -238,14 +238,14 @@ jobs:
- job_003
- job_004
job_008:
name: "run_tests; linux; PKG: protoc_plugin; `./../tool/setup.sh`, `make protos`, `pub run test`"
name: "run_tests; linux; PKG: protoc_plugin; `./../tool/setup.sh`, `make protos`, `dart --no-sound-null-safety test`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@v2
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;dart:dev;packages:protoc_plugin;commands:command_0-command_2-test"
key: "os:ubuntu-latest;pub-cache-hosted;dart:dev;packages:protoc_plugin;commands:command_0-command_2-command_3"
restore-keys: |
os:ubuntu-latest;pub-cache-hosted;dart:dev;packages:protoc_plugin
os:ubuntu-latest;pub-cache-hosted;dart:dev
Expand All @@ -269,10 +269,10 @@ jobs:
if: "always() && steps.protoc_plugin_pub_upgrade.conclusion == 'success'"
working-directory: protoc_plugin
run: make protos
- name: protoc_plugin; pub run test
- name: "protoc_plugin; dart --no-sound-null-safety test"
if: "always() && steps.protoc_plugin_pub_upgrade.conclusion == 'success'"
working-directory: protoc_plugin
run: pub run test
run: dart --no-sound-null-safety test
needs:
- job_001
- job_002
Expand Down
2 changes: 1 addition & 1 deletion protoc_plugin/mono_pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ stages:
- group:
- command: ./../tool/setup.sh
- command: make protos
- test
- command: dart --no-sound-null-safety test
dart: [dev]
4 changes: 3 additions & 1 deletion protoc_plugin/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Protoc compiler plugin to generate Dart code
homepage: https://github.com/dart-lang/protobuf

environment:
sdk: '>=2.11.0 <3.0.0'
sdk: '>=2.12.0-0 <3.0.0'

dependencies:
fixnum: ^1.0.0
Expand All @@ -15,6 +15,8 @@ dependencies:
dev_dependencies:
test: ^1.16.0
pedantic: ^1.10.0
matcher: ^0.12.10
collection: ^1.15.0

executables:
protoc-gen-dart: protoc_plugin
4 changes: 4 additions & 0 deletions tool/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ for PKG in ${PKGS}; do
echo 'make protos'
make protos || EXIT_CODE=$?
;;
command_3)
echo 'dart --no-sound-null-safety test'
dart --no-sound-null-safety test || EXIT_CODE=$?
;;
dartanalyzer_0)
echo 'dartanalyzer --fatal-warnings .'
dartanalyzer --fatal-warnings . || EXIT_CODE=$?
Expand Down

0 comments on commit d53d2bb

Please sign in to comment.