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

Move to use (experimental) workspaces #1433

Merged
merged 1 commit into from
Aug 5, 2024
Merged

Move to use (experimental) workspaces #1433

merged 1 commit into from
Aug 5, 2024

Conversation

kevmoo
Copy link
Collaborator

@kevmoo kevmoo commented Jun 27, 2024

No description provided.

@kevmoo kevmoo force-pushed the workspaces branch 2 times, most recently from a3d225c to 7895318 Compare August 5, 2024 20:55
@kevmoo kevmoo requested a review from jakemac53 August 5, 2024 20:55
@@ -153,14 +156,21 @@ String _classCleanAndSort(Iterable<String> classes) {
extension on BuildStep {
AssetId assetIdForInputPackage(String path) => AssetId(inputId.package, path);

// WARNING! This function does BAD THINGS
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not my best work...but 🤷

Copy link
Collaborator

@jakemac53 jakemac53 Aug 5, 2024

Choose a reason for hiding this comment

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

Looking at this code, there might actually be a proper way to do it. The JSON annotation package could make its own pubspec.yaml file public (readable) using the additional_public_assets option.

I think you could just add into its build.yaml file:

additional_public_assets:
  - pubspec.yaml

And then you could read it just like buildStep.readAsString(AssetId('json_annotation', 'pubspec.yaml'))?

You would have to require the latest json_annotation, which adds the public asset.

@kevmoo kevmoo merged commit ac55cd4 into master Aug 5, 2024
18 checks passed
@kevmoo kevmoo deleted the workspaces branch August 5, 2024 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants