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

Adapt paths for different development environments #336

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

maple135790
Copy link

related: #335


  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.

@@ -31,7 +31,7 @@ environment:
sdk: '^$sdkVersion'
dependencies:
web:
path: ${Directory.current.path}
path: ${p.current.replaceAll(r'\', '/')}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Directory.current.uri.toFilePath() makes more sense here than us manually modifying the path.

@@ -17,6 +17,7 @@
`HTMLIFrameElement.contentWindowCrossOrigin`, `Window.openCrossOrigin`,
`Window.openerCrossOrigin`, `Window.topCrossOrigin`,
and `Window.parentCrossOrigin`.
- Forced test `pubspec.yaml` web path to be POSIX-like path.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think there needs to be a changelog entry here as it doesn't affect users, just our own testing.

@@ -14,8 +14,9 @@ Future<void> main(List<String> args) async {
final offline = args.length == 1 && args.first == '--offline';

// clone the repo
final repoDir =
Directory(Platform.script.resolve('../.dart_tool/mdn_content').path);
final repoUri = Platform.script.resolve('../.dart_tool/mdn_content');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can just inline these instead of introducing variables that are never used otherwise. This applies everywhere else where we introduce a <>Uri variable just to be wrapped by a p.context.fromUri call immediately after.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants