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

Fix pub warnings for tool package before publishing #146

Merged
merged 8 commits into from Dec 23, 2020
Merged

Conversation

subfuzion
Copy link
Member

Draft PR while I fix issues:

Just discovered pub warnings while working on the docs and realizing we hadn't published to pub.dev yet:

Package validation found the following errors:
* You must have a LICENSE file in the root directory.
  An open-source license helps ensure people can legally use your code.
* line 15, column 1 of lib/src/builder/builder.dart: source_gen is in the `dev_dependencies` section of `pubspec.yaml`. Packages used in lib/ must be declared in the `dependencies` section.
     ╷
  15 │ import 'package:source_gen/source_gen.dart';
     │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     ╵
* line 16, column 1 of lib/src/builder/builder.dart: build is in the `dev_dependencies` section of `pubspec.yaml`. Packages used in lib/ must be declared in the `dependencies` section.
     ╷
  16 │ import 'package:build/build.dart';
     │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     ╵
* line 19, column 1 of lib/src/builder/src/code_generator.dart: build is in the `dev_dependencies` section of `pubspec.yaml`. Packages used in lib/ must be declared in the `dependencies` section.
     ╷
  19 │ import 'package:build/build.dart';
     │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     ╵
* line 21, column 1 of lib/src/builder/src/code_generator.dart: glob is in the `dev_dependencies` section of `pubspec.yaml`. Packages used in lib/ must be declared in the `dependencies` section.
     ╷
  21 │ import 'package:glob/glob.dart';
     │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     ╵
* line 22, column 1 of lib/src/builder/src/code_generator.dart: source_gen is in the `dev_dependencies` section of `pubspec.yaml`. Packages used in lib/ must be declared in the `dependencies` section.
     ╷
  22 │ import 'package:source_gen/source_gen.dart';
     │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     ╵
Package validation found the following potential issue:
* ./CHANGELOG.md doesn't mention current version (0.3.0-dev).
  Consider updating it with notes on this version prior to publication.
Sorry, your package is missing some requirements and can't be published yet.
For more information, see: https://dart.dev/tools/pub/cmd/pub-lish.

kevmoo
kevmoo previously approved these changes Dec 23, 2020
@subfuzion
Copy link
Member Author

subfuzion commented Dec 23, 2020

@kevmoo Note: I can fix those errors by moving the builder code out of lib (e.g., put under tool dir like stagehand does), but I don't want to for now. I'd like to be able to export the ability to build templates as part of the tool API. Instead, I just want to move the deps from dev_dependencies to normal dependencies for now.

@subfuzion subfuzion marked this pull request as ready for review December 23, 2020 21:08
@kevmoo
Copy link
Collaborator

kevmoo commented Dec 23, 2020

Under the tool dir makes sense to me. These are not things that are needed at runtime on the users machine.

@subfuzion
Copy link
Member Author

The package isn't meant to just be a CLI -- it's meant to support other tools that can leverage it. The builder can't be exported if not under lib.

@kevmoo
Copy link
Collaborator

kevmoo commented Dec 23, 2020 via email

@subfuzion
Copy link
Member Author

subfuzion commented Dec 23, 2020

It could be refactored out into its own package, but that would take time. I figured this was the least amount of work to get this out today.

@subfuzion
Copy link
Member Author

It's fine, I can move it -- I just have to go through the cycle of rebuilding and getting presubmit checks to pass, etc.

@subfuzion
Copy link
Member Author

At some point, various tool package consumers (a CLI, Cloud Code, etc.) will be in their separate packages. I'll go ahead and refactor for now if that's your preference. Just going to take a bit longer than I wanted while working on docs today. Running against the clock now! :D

@subfuzion
Copy link
Member Author

@kevmoo PTAL

@subfuzion subfuzion merged commit 129302d into main Dec 23, 2020
@subfuzion subfuzion deleted the publish-tool branch December 23, 2020 22:07
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.

None yet

2 participants