onepub-dev / dcli

An extensive library and tooling for building console/cli applications and scripts using the Dart programming language.
242 stars 28 forks source link

remove the concept of virtual project. #102

Closed bsutton closed 3 years ago

bsutton commented 4 years ago

Remove the concept of virtual projects.

Have dcli create create a pubspec.

When running a script if no pubspec just creating with an info message.

If there is a pubpsec in a parent directory: create doesn't create a pubspec.

If they go to run a script and they have a local and a parent then warn them about dev tools not working and run it anyway.

If the script has an anotation then we create a local pubspec immediately. If there is a parent pubspec then warn them and don't do anything. If there is not a parent than expand the annotation into the local directory.

Change compile to create the local pubspec.

bsutton commented 3 years ago

So does this mean that we loose the .dcli/dependencies.yaml?

I think for now we remove it as we are moving towards explict pubspec.yamls. We may come back and re-introduce it as a template that we use when creating new pubspec.yamls. This would allow

pros Annotations could benefit from the dependency injection. The split command can be used to create a complete pubspec. We are no creating the pubspec if we see an annotation- this makes annotations less useful as they are likely to fall out of date. We could use the dependency.yaml as a template when creating the default pubspec.yaml?

cons It makes the code more complex. ide's don't see the dependencies which make working with the scripts hard. As we are now creating the pubspec.yaml we possibly don't need to do dependency injection.

bsutton commented 3 years ago

released in 0.25.0