Closed sethladd closed 9 years ago
Here's what webstorm shows:
It may be that files under "test" are ignored altogether by the DAS.
I mean, in the Dart plugin.
hm, the file 'test.dart' isn't under test. It's in the Desktop directory.
I don't think the DAS is doing any ignoring here, because webstorm is showing errors, and webstorm uses the DAS.
Yes, it must be the plugin's fault, but I was thinking maybe the plugin makes the DAS ignore files under "test" in a pub package. Not sure at all, though. Need to look into it.
Is your file in a pub package folder structure?
My test.dart file is literally inside of the Desktop directory. It's the only file in the Desktop directory.
Thanks. If you get no errors shown at all for broken code, then probably a single-file scenario like this one is unsupported atm by the plugin. I think it always checks for a pubspec.yaml and ignores files if it doesn't find one.
Thanks for checking it out. The sublime plugin should work for a single stand-alone file, if that file is a library (not a part).
Hi,
We just ran into this scenario with an internal user. We wanted to open Sublime, create a new Dart file, and analyze it. We didn't have a pubspec.yaml file, so we didn't see errors or warnings.
What do you need from us to make this scenario work? :)
Thanks!!
I seem to remember in the very beginning we decided against it. But can't really say for sure any more.
The plugin should be modified to allow this. I don't think it will be too much work, but I havent' gotten around to it yet.
Perhaps the issue is... how do we know if we're in a Dart project?
If I have an empty directory, with a single Dart file (which is an entry point or a library file (not a part file)), I would want to treat that as a "Dart project".
But, this would require us to assume a bunch more about the environment. So I'll start a thread on analyzer-discuss@ to see what other people think.
Some logic and ideas for how to detect a Dart project. https://groups.google.com/a/dartlang.org/forum/#!topic/analyzer-discuss/HVLgtVXyB18
In the meantime, I updated https://github.com/guillermooo/dart-sublime-bundle/wiki/Installation-and-Basic-Configuration with explicit instructions to add a pubspec.yaml file. Hope that helps!
Just tried with a sindle main.dart file inside an otherwise empty folder and everything seems to be working (using repo's head, not latest release). I don't remember changing anything related to this scenario.
Thanks! On Sat, Jun 13, 2015 at 17:51 Guillermo López-Anglada < notifications@github.com> wrote:
Closed #525 https://github.com/guillermooo/dart-sublime-bundle/issues/525 via 9f565bf https://github.com/guillermooo/dart-sublime-bundle/commit/9f565bf1366e760c8d8a2ccf5738f0f1745136bc .
— Reply to this email directly or view it on GitHub https://github.com/guillermooo/dart-sublime-bundle/issues/525#event-330220833 .
Now running plugin 1.4.1 with Dart 1.10.0.
I have a single test.dart file:
which lives on my desktop.
Expected: a warning that notHere() doesn't exist.
Actual: no warning.
Screenshot:
(see "unknown include #regex.dart" in console... related?)