Resolve / announce breaking change on `const X.fromEnvironment` in VM

Currently, with the constant-update-2018 change, the VM no longer supports (or plans to support) const X.fromEnvironment for values defined at runtime in JIT mode.

That would make it consistent (?) with the VM in AOT mode, Dart2JS, and DDC.

If we’re agreed on this behavior going forward, we need a breaking change announcement.

@a-siva @leafpetersen @lrhn @kmillikin @sigmundch @aadilmaan

Author: Fantashit

1 thought on “Resolve / announce breaking change on `const X.fromEnvironment` in VM

  1. I’m not sure having two different environments makes sense. I’d prefer if the environment is locked down at one particular point in time, usually compilation time, and after that you cannot change it. The .dill file should contain the entire environment so that new String.fromEnvironment gives the same result as const String.fromEnvironment. So, I’d say it’s a good idea to not allow -D in the VM when running from .dill file, and make sure that the defines used when creating the .dill file are still available (if there is any access to new ...fromEnvironment at all, otherwise it can be garbage collected/tree shaken).

Comments are closed.