Require an import to choose server or client runtime #457
Labels
area-language
Dart language related items (some items might be better tracked at github.com/dart-lang/language).
closed-not-planned
Closed as we don't intend to take action on the reported issue
type-enhancement
A request for a change that isn't a bug
This issue was originally filed by [email protected]
When writing code destined to run on a server, I can make use of runtime library classes such as File, InputStream, Process, etc. However, there is no marker in the code itself that indicates that the code is intended for that particular runtime (as opposed to a browser runtime). This makes it hard for tools such as the Dart editor to determine what library code to include when performing checks.
Currently, the editor complains about File, InputStream, etc., being missing. But even when the VM is integrated into the editor, if I am working on both client and serve code there will be no way for the editor to know which runtime library to use to validate a give source file.
I believe it would not be onerous for developers to add a single #import statement to the head of each library to bring in the appropriate runtime support for that library. Then tools will be able to make an appropriate determination of how to validate and run the code for each library.
The text was updated successfully, but these errors were encountered: