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

improve tool/test.dart #2

Open
wants to merge 73 commits into
base: master
Choose a base branch
from
Open

improve tool/test.dart #2

wants to merge 73 commits into from

Conversation

sigurdm
Copy link
Owner

@sigurdm sigurdm commented Sep 2, 2021

  • Use dart run to invoke the test runner
  • Run the tests with ProcessMode.inheritStdio
  • Print failures when the snapshot doesn't build.

sigurdm and others added 30 commits January 28, 2021 14:44
isTravis would only return true on Travis and pub no longer uses Travis.
To run a command in another directory from CWD
This is a merge to keep that branch in history.
Co-authored-by: Jonas Finnemann Jensen <[email protected]>
Write the archive to disk before un-taring it.

Co-authored-by: Sigurd Meldgaard <[email protected]>
jonasfj and others added 28 commits May 21, 2021 12:37
Because it's only accessed inside this class.
* Change terminology for precompilation to building

Co-authored-by: Michael Thomsen <[email protected]>
* Add test to ignore dot-files

* Add test to check dot-files are not included in while publishing
* fail CI on info level issues; fix directives sorting

* some whitespace changes
* Validate and normalize hosted url.

We normalize the URL for a _hosted pub server_ to have no slash if the
server is just a bare domain like `https://example.com`, but if the URL
contains a path like `https://example.com/my-folder` then we always
normalize to `https://example.com/my-folder/`.

The reason for normalizing the URL is to improve consistency in
`pubspec.lock` and make it easier to implement authentication without
risks of being tricked by incorrect prefixes.

Additionally, be normalizing to no slash for empty paths, and paths
always ending in a slash when path is non-empty, we gain the benefit
that relative URLs can always be constructed correctly using
`hostedUrl.resolve('api/packages/$package')`.

This additionally forbids a few edge cases such as:
 * querystring in the hosted URL (`https://server.com/?query`),
 * fragment in the hosted URL (`https://server.com/#hash`),
 * user-info in the hosted URL (`https://user:[email protected]`).

These may have worked with previous versions of the `pub` client, but
most likely the _querystring_ or _fragment_ would cause URLs to be garbled.
Any user-info would likely have been ignored, this was not tested, any
usage of these options is considered unlikely.

Previously, `dart pub publish` would ignore the path in the hosted URL
and always upload to `/api/packages/new`. This commit fixes this issue.
* Detect Flutter SDK location relative to Dart SDK

If the Dart SDK is present inside the Flutter SDK in sub-folder
`bin/cache/dart-sdk/`, then we no-longer require the environment
variable `FLUTTER_ROOT` to be specified. Instead we simply derive
the location of the Flutter SDK from the location of the Dart SDK.

We still allow the environment variable `FLUTTER_ROOT` to override
the otherwise automatically detected Flutter SDK location.

* Check that "version" file is present before deciding that we have found a Flutter SDK
* Add executables to allErrors

* Improve tests of executables
Always precompile apps before running them, even if they aren't immutable
Use `dart run instead`
↓
Use `dart run` instead
Use stdout.hasTerminal instead of stdioType(stdout)
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.