Discussion:
[dart-misc] Convention for library name for build.dart?
Don Olmstead
2015-08-20 17:52:09 UTC
Permalink
I've been using a build.dart in libraries I'm doing codegen on. With
source_gen I see Kevin
uses https://github.com/dart-lang/source_gen/blob/master/build.dart

library source_gen.build_file;

Is there a consensus around this? Wanted to make sure my code passes
linting and currently it fails due to the naming as its not in the lib
directory. Didn't want to open an issue on the linter if there was no
agreement.
--
For other discussions, see https://groups.google.com/a/dartlang.org/

For HOWTO questions, visit http://stackoverflow.com/tags/dart

To file a bug report or feature request, go to http://www.dartbug.com/new

To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
'Natalie Weizenbaum' via Dart Misc
2015-08-20 21:51:42 UTC
Permalink
I think soon this will be irrelevant
<https://github.com/dart-lang/sdk/commit/67e988bb9f52424ddfa442a2bafda00bd33a0d7a>,
but the convention I usually see is taking the package: URL, removing src
if necessary, and replacing / with .. So pkg/lib/src/foo/bar/baz.dart is
package:pkg/src/foo/bar/baz.dart, and the library name would be
pkg.foo.bar.baz.
Post by Don Olmstead
I've been using a build.dart in libraries I'm doing codegen on. With
source_gen I see Kevin uses
https://github.com/dart-lang/source_gen/blob/master/build.dart
library source_gen.build_file;
Is there a consensus around this? Wanted to make sure my code passes
linting and currently it fails due to the naming as its not in the lib
directory. Didn't want to open an issue on the linter if there was no
agreement.
--
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
To unsubscribe from this group and stop receiving emails from it, send an
--
For other discussions, see https://groups.google.com/a/dartlang.org/

For HOWTO questions, visit http://stackoverflow.com/tags/dart

To file a bug report or feature request, go to http://www.dartbug.com/new

To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
Don Olmstead
2015-08-20 23:42:58 UTC
Permalink
Yea since build.dart is in the root it ends up falling apart with the
linter. Doesn't seem to complain with no library name though so will just
use that.

Thanks Natalie!

On Thu, Aug 20, 2015 at 2:51 PM, 'Natalie Weizenbaum' via Dart Misc <
Post by 'Natalie Weizenbaum' via Dart Misc
I think soon this will be irrelevant
<https://github.com/dart-lang/sdk/commit/67e988bb9f52424ddfa442a2bafda00bd33a0d7a>,
but the convention I usually see is taking the package: URL, removing src
if necessary, and replacing / with .. So pkg/lib/src/foo/bar/baz.dart is
package:pkg/src/foo/bar/baz.dart, and the library name would be
pkg.foo.bar.baz.
Post by Don Olmstead
I've been using a build.dart in libraries I'm doing codegen on. With
source_gen I see Kevin uses
https://github.com/dart-lang/source_gen/blob/master/build.dart
library source_gen.build_file;
Is there a consensus around this? Wanted to make sure my code passes
linting and currently it fails due to the naming as its not in the lib
directory. Didn't want to open an issue on the linter if there was no
agreement.
--
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
To unsubscribe from this group and stop receiving emails from it, send an
--
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
To unsubscribe from this group and stop receiving emails from it, send an
--
For other discussions, see https://groups.google.com/a/dartlang.org/

For HOWTO questions, visit http://stackoverflow.com/tags/dart

To file a bug report or feature request, go to http://www.dartbug.com/new

To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
Loading...