Skip to content

Sort dependencies after override #12

@agent3bood

Description

@agent3bood

The command multipack pubspec override should sort dependencies after overriding it. This is causing the CI of gql packages to fail.

example:

Original pubspec.yaml

name: gql_http_link
version: 0.4.2
description: GQL Terminating Link to execute requests via HTTP using JSON.
repository: https://github.com/gql-dart/gql
environment: 
  sdk: '>=2.12.0 <3.0.0'
dependencies: 
  gql: ^0.13.0
  gql_exec: ^0.4.0
  gql_link: ^0.4.2
  http: ^0.13.0
  http_parser: ^4.0.0
  meta: ^1.3.0
dev_dependencies: 
  build_runner: ^2.0.0
  gql_pedantic: ^1.0.2
  mockito: ^5.0.0-nullsafety.7
  test: ^1.16.2

After running override

name: gql_http_link
version: 0.4.2
description: GQL Terminating Link to execute requests via HTTP using JSON.
repository: https://github.com/gql-dart/gql
environment: 
  sdk: '>=2.12.0 <3.0.0'
dependencies: 
  gql: ^0.13.0
  gql_exec: ^0.4.0
  gql_link: ^0.4.2
  http: ^0.13.0
  http_parser: ^4.0.0
  meta: ^1.3.0
dev_dependencies: 
  build_runner: ^2.0.0
  gql_pedantic: ^1.0.2
  mockito: ^5.0.0-nullsafety.7
  test: ^1.16.2
dependency_overrides: 
  gql_pedantic: 
    path: ../../gql_pedantic
  gql:                                    <<<<<<< error, this should be placed before gql_pedantic
    path: ../../gql
  gql_exec: 
    path: ../gql_exec
  gql_link: 
    path: ../gql_link
  gql_websocket_link: 
    path: ../gql_websocket_link
  gql_transform_link: 
    path: ../gql_transform_link
  gql_error_link: 
    path: ../gql_error_link
  gql_code_builder: 
    path: ../../codegen/gql_code_builder
  gql_build: 
    path: ../../codegen/gql_build
  gql_example_http_auth_link: 
    path: ../../examples/gql_example_http_auth_link
  gql_dio_link: 
    path: ../gql_dio_link
  gql_example_dio_link: 
    path: ../../examples/gql_example_dio_link
  gql_example_cli_github: 
    path: ../../examples/gql_example_cli_github
  gql_example_cli: 
    path: ../../examples/gql_example_cli
  gql_example_build: 
    path: ../../examples/gql_example_build
  gql_dedupe_link: 
    path: ../gql_dedupe_link
  end_to_end_test: 
    path: ../../codegen/end_to_end_test

Example hard_override

Original pubspec.yaml

name: gql_build
version: 0.4.0
description: Useful builders for your GraphQL SDL and documents. Based on package:gql_code_builder and package:build
repository: https://github.com/gql-dart/gql
environment: 
  sdk: '>=2.12.0 <3.0.0'
dependencies: 
  analyzer: ^2.3.0
  build: ^2.1.0
  built_collection: ^5.0.0
  built_value: ^8.0.6
  built_value_generator: ^8.0.6
  code_builder: ^4.0.0
  dart_style: ^2.0.0
  glob: ^2.0.0
  gql: ^0.13.0
  gql_code_builder: ^0.4.0
  path: ^1.8.0
  yaml: ^3.1.0
dev_dependencies: 
  build_test: ^2.0.0
  gql_pedantic: ^1.0.2

After multipack pubspec hard_override

name: gql_build
version: 0.4.0
description: Useful builders for your GraphQL SDL and documents. Based on package:gql_code_builder and package:build
repository: https://github.com/gql-dart/gql
environment: 
  sdk: '>=2.12.0 <3.0.0'
dependencies: 
  analyzer: ^2.3.0
  build: ^2.1.0
  built_collection: ^5.0.0
  built_value: ^8.0.6
  built_value_generator: ^8.0.6
  code_builder: ^4.0.0
  dart_style: ^2.0.0
  glob: ^2.0.0
  path: ^1.8.0
  yaml: ^3.1.0
  gql: 
    path: ../../gql
  gql_code_builder: 
    path: ../gql_code_builder
dev_dependencies: 
  build_test: ^2.0.0
  gql_pedantic: 
    path: ../../gql_pedantic

Related commit gql-dart/gql@e0f5f37

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions