site-www
site-www copied to clipboard
Document "environment variables"
From @nicolasgarnier on August 26, 2014 15:19
From [email protected] on January 06, 2014 23:47:15
The VM and core libraries have some sort of "fromEnvironment()" thing. I can't find any documentation on how to use it, what it's intended purpose is, how it works in a browser, rationale behind it, why it has such a confusing name, etc.
Original issue: http://code.google.com/p/dart/issues/detail?id=15926
Copied from original issue: dart-lang/www.dartlang.org#809
From @nicolasgarnier on August 26, 2014 15:19
From [email protected] on January 07, 2014 13:43:17
In the meantime: http://blog.sethladd.com/2013/12/compile-time-dead-code-elimination-with.html
Status: Triaged
Labels: -Type-Defect Type-Task Area-Documentation
From @nicolasgarnier on August 26, 2014 15:19
From [email protected] on January 09, 2014 03:26:11
The problem with this feature is that there is no class or library to document. All of the functionality lives in three constructors on different classes.
The String.fromEnvironment is the most generic one, and we should probably put any documentation there, and let the other two refer to the String constructor.
Also, the syntax to define the values isn't part of the language or library, We have agreed on using -Dfoo=bar on the VM and dart2js command lines, but another embedder or compiler could use something else. We can at most use the syntax as an example.
From @nicolasgarnier on August 26, 2014 15:19
From [email protected] on June 04, 2014 14:53:22
Labels: -Area-Documentation Area-Site
@munificent : Is this still an issue? We cover a good bit on envvar, but maybe we're not as complete as needed.
This is still an issue and is likely something we should cover in the library tour. It's actually about environment declarations rather than environment variables.
Superseded by https://github.com/dart-lang/site-www/issues/4349
Edit: We have released a guide covering compile environment declarations at https://dart.dev/guides/environment-declarations!