Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resident compiler and Platform.script #51064

Open
ykmnkmi opened this issue Jan 19, 2023 · 1 comment
Open

Resident compiler and Platform.script #51064

ykmnkmi opened this issue Jan 19, 2023 · 1 comment
Labels
area-dart-cli Use area-dart-cli for issues related to the 'dart' command like tool.

Comments

@ykmnkmi
Copy link
Contributor

ykmnkmi commented Jan 19, 2023

Now, I know why it works this way, but I didn't expect this.

import 'dart:io';

void main() {
  print(Platform.script);

  var uri = Platform.script.resolve('data');
  print(File.fromUri(uri).existsSync());
}
PS C:\...> dart run .\bin\main.dart
file:///C:/.../bin/main.dart
true
PS C:\...> dart run -r .\bin\main.dart
file:///c:/.../.dart_tool/kernel/bin/main.dart-2.19.0-444.4.beta.dill
false
@ykmnkmi
Copy link
Contributor Author

ykmnkmi commented Jan 19, 2023

Dart SDK version: 2.19.0-444.4.beta (beta) (Tue Jan 10 10:24:44 2023 +0000) on "windows_x64"

@a-siva a-siva added the area-dart-cli Use area-dart-cli for issues related to the 'dart' command like tool. label Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-dart-cli Use area-dart-cli for issues related to the 'dart' command like tool.
Projects
None yet
Development

No branches or pull requests

2 participants