Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added workspace: and resolution: fields #1948

Merged
merged 6 commits into from
Dec 27, 2024

Conversation

Levi-Lesches
Copy link
Contributor

@Levi-Lesches Levi-Lesches commented Dec 23, 2024

Fixes #1814 by adding Pubspec.workspace (List<String>?) and Pubspec.resolution (String?). Didn't bump the changelog or version yet because I didn't want to conflict with #1946 (@kevmoo?), but I can do that once it's merged (or rebase this onto that branch).

Does not check that dart: ^3.6.0, leaving that up to these lines in Pub.

An omitted resolution: or workspace field is treated as null.


  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.

Copy link

github-actions bot commented Dec 23, 2024

PR Health

Breaking changes ✔️
Package Change Current Version New Version Needed Version Looking good?
pubspec_parse Non-Breaking 1.4.0 1.5.0-wip 1.5.0 ✔️
Changelog Entry ✔️
Package Changed Files

Changes to files need to be accounted for in their respective changelogs.

Coverage ✔️
File Coverage
pkgs/pubspec_parse/lib/src/pubspec.dart 💚 100 %

This check for test coverage is informational (issues shown here will not fail the PR).

API leaks ✔️

The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.

Package Leaked API symbols
License Headers ✔️
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
Files
no missing headers

All source files should start with a license header.

Unrelated files missing license headers
Files
pkgs/bazel_worker/benchmark/benchmark.dart
pkgs/bazel_worker/example/client.dart
pkgs/bazel_worker/example/worker.dart
pkgs/benchmark_harness/integration_test/perf_benchmark_test.dart
pkgs/boolean_selector/example/example.dart
pkgs/clock/lib/clock.dart
pkgs/clock/lib/src/clock.dart
pkgs/clock/lib/src/default.dart
pkgs/clock/lib/src/stopwatch.dart
pkgs/clock/lib/src/utils.dart
pkgs/clock/test/clock_test.dart
pkgs/clock/test/default_test.dart
pkgs/clock/test/stopwatch_test.dart
pkgs/clock/test/utils.dart
pkgs/html/example/main.dart
pkgs/html/lib/dom.dart
pkgs/html/lib/dom_parsing.dart
pkgs/html/lib/html_escape.dart
pkgs/html/lib/parser.dart
pkgs/html/lib/src/constants.dart
pkgs/html/lib/src/encoding_parser.dart
pkgs/html/lib/src/html_input_stream.dart
pkgs/html/lib/src/list_proxy.dart
pkgs/html/lib/src/query_selector.dart
pkgs/html/lib/src/token.dart
pkgs/html/lib/src/tokenizer.dart
pkgs/html/lib/src/treebuilder.dart
pkgs/html/lib/src/utils.dart
pkgs/html/test/dom_test.dart
pkgs/html/test/parser_feature_test.dart
pkgs/html/test/parser_test.dart
pkgs/html/test/query_selector_test.dart
pkgs/html/test/selectors/level1_baseline_test.dart
pkgs/html/test/selectors/level1_lib.dart
pkgs/html/test/selectors/selectors.dart
pkgs/html/test/support.dart
pkgs/html/test/tokenizer_test.dart
pkgs/pubspec_parse/test/git_uri_test.dart
pkgs/stack_trace/example/example.dart
pkgs/watcher/test/custom_watcher_factory_test.dart
pkgs/yaml_edit/example/example.dart

@Levi-Lesches
Copy link
Contributor Author

Levi-Lesches commented Dec 23, 2024

Okay seems I did need to bump for the CI to pass -- done. Also, what are your thoughts on

  • Pubspec.isWorkspaceRoot: returns true if workspace != null
  • Pubspec.isInWorkspace: returns true if resolution == 'workspace'
  • changing Pubspec.resolution from a String? to a Resolution, as Pub does

Copy link

Package publishing

Package Version Status Publish tag (post-merge)
package:pubspec_parse 1.5.0 ready to publish pubspec_parse-v1.5.0
package:file_testing 3.1.0-wip WIP (no publish necessary)
package:boolean_selector 2.1.2 already published at pub.dev
package:browser_launcher 1.1.3 already published at pub.dev
package:cli_config 0.2.1-wip WIP (no publish necessary)
package:cli_util 0.4.2 already published at pub.dev
package:clock 1.1.2 already published at pub.dev
package:code_builder 4.10.1 already published at pub.dev
package:coverage 1.11.1 already published at pub.dev
package:csslib 1.0.2 already published at pub.dev
package:extension_discovery 2.1.0 already published at pub.dev
package:file 7.0.2-wip WIP (no publish necessary)
package:bazel_worker 1.1.3-wip WIP (no publish necessary)
package:graphs 2.3.3-wip WIP (no publish necessary)
package:html 0.15.5 already published at pub.dev
package:io 1.0.5 already published at pub.dev
package:json_rpc_2 3.0.3 already published at pub.dev
package:mime 2.0.0 already published at pub.dev
package:oauth2 2.0.4-wip WIP (no publish necessary)
package:package_config 2.1.1 already published at pub.dev
package:pool 1.5.2-wip WIP (no publish necessary)
package:pub_semver 2.1.5 already published at pub.dev
package:benchmark_harness 2.3.1 already published at pub.dev
package:source_map_stack_trace 2.1.3-wip WIP (no publish necessary)
package:yaml_edit 2.2.2 already published at pub.dev
package:source_span 1.10.1 already published at pub.dev
package:sse 4.1.7 already published at pub.dev
package:stack_trace 1.12.1 already published at pub.dev
package:stream_channel 2.1.3 already published at pub.dev
package:stream_transform 2.1.1 already published at pub.dev
package:string_scanner 1.4.1 already published at pub.dev
package:term_glyph 1.2.2 already published at pub.dev
package:test_reflective_loader 0.2.3 already published at pub.dev
package:timing 1.0.2 already published at pub.dev
package:unified_analytics 7.0.1 already published at pub.dev
package:watcher 1.1.1 already published at pub.dev
package:yaml 3.1.3 already published at pub.dev
package:source_maps 0.10.14-wip WIP (no publish necessary)

Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.

@kevmoo
Copy link
Member

kevmoo commented Dec 23, 2024

Tests? You added a changelog entry? swoon

@Levi-Lesches
Copy link
Contributor Author

Mostly working tests, too! Should be good now

@kevmoo
Copy link
Member

kevmoo commented Dec 27, 2024

Okay seems I did need to bump for the CI to pass -- done. Also, what are your thoughts on

great questions

  • Pubspec.isWorkspaceRoot: returns true if workspace != null
  • Pubspec.isInWorkspace: returns true if resolution == 'workspace'

These seem like just adding complexity. Would like to keep this simple.

  • changing Pubspec.resolution from a String? to a Resolution, as Pub does

Ditto. No clue where pub will go. Leaving it as a string for now is most simple.

Copy link
Member

@kevmoo kevmoo left a comment

Choose a reason for hiding this comment

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

Two things then I'll land it. Amazing. Thanks!

pkgs/pubspec_parse/CHANGELOG.md Outdated Show resolved Hide resolved
pkgs/pubspec_parse/pubspec.yaml Outdated Show resolved Hide resolved
Co-authored-by: Kevin Moore <[email protected]>
@Levi-Lesches
Copy link
Contributor Author

Done, thanks!

@kevmoo kevmoo merged commit 342e002 into dart-lang:main Dec 27, 2024
14 checks passed
@gabrielgarciagava
Copy link

@kevmoo When can we expect this to be published?

Dhruv-Maradiya added a commit to Dhruv-Maradiya/tools that referenced this pull request Dec 31, 2024
Added `workspace:` and `resolution: fields` (dart-lang#1948)
Dhruv-Maradiya added a commit to Dhruv-Maradiya/tools that referenced this pull request Dec 31, 2024
Dhruv-Maradiya added a commit to Dhruv-Maradiya/tools that referenced this pull request Dec 31, 2024
Revert "Added `workspace:` and `resolution: fields` (dart-lang#1948)"
@kevmoo
Copy link
Member

kevmoo commented Jan 2, 2025

@kevmoo When can we expect this to be published?

We have a few other PRs we need to land...

@spydon
Copy link
Contributor

spydon commented Jan 7, 2025

@kevmoo would it be possible to publish this first? 😇
We're currently blocked on releasing Melos with the Pub Workspaces feature until this is released, since pub doesn't allow git dependencies.

@devoncarew
Copy link
Member

We'd like to land #1952 first (if that doesn't happen soon, we can publish and rebase that PR for a future -wip version).

@devoncarew
Copy link
Member

@Levi-Lesches (and @Dhruv-Maradiya) thanks for your contributions. This was published along with the related #1952.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for (new) workspace feature
5 participants