Skip to content

Merge dependency services #3303

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

Merged

Conversation

sigurdm
Copy link
Contributor

@sigurdm sigurdm commented Feb 4, 2022

No description provided.

sigurdm and others added 24 commits November 5, 2021 13:04
Piping `stdin` to a `LineSplitter` and then using a `StreamQueue` causes
event handler to wait for next characters after a line has been read.
Hence, if we don't `exit()` explicitly or hit `stdin.close()` then the
process will hang waiting for input on `stdin`.

Using `stdin.readLineSync()` alleviates this issue. Having a timeout on
prompts for tokens is nice, but only really required if we prompt while
the solver is running. Which we probably won't need to do anyways, so
not having a timeout is likely fine.
Piping `stdin` to a `LineSplitter` and then using a `StreamQueue` causes
event handler to wait for next characters after a line has been read.
Hence, if we don't `exit()` explicitly or hit `stdin.close()` then the
process will hang waiting for input on `stdin`.

Using `stdin.readLineSync()` alleviates this issue. Having a timeout on
prompts for tokens is nice, but only really required if we prompt while
the solver is running. Which we probably won't need to do anyways, so
not having a timeout is likely fine.
Ensures that commit won't disappear from git in the future.
* Make globalPackageServer non-nullable

* Remove unnecessary null assertions

* Future -> Future<void>

* Apply format
* Remove pedantic and cleanup a few lints

* Do not use super as an object

* Rename SolveType constants

* Retain prefer_single_quotes

* Rename to camelCase in log.dart
* Refactor notices/hints for solver conflicts.

Untangled a lot of type assertions and digging into details of the
incompatibility when printing the incompatibility. Notably, we introduce
a concept of notices and hints.

Notices are messages that an `IncompatibilityCause` can have, they are
human readable messages printed before the incompatibility explanation.
This allows `SdkCause` to point out the current version of an SDK that
is causing a conflict (if the SDK is available).

Hints are messages that an `IncompatibilityCause` can have, they are
human readable message with actionable hints to be printed after the
incompatibility explanation. This allows `PackageNotFoundCause` to hint
that trying without `--offline` might work.

Hints are printed after the incompatibility explanation because they
actionable, they don't serve to explain what went wrong. They are
intended to be actionable, hence, it's preferable the user sees these as
one of the first things.
@sigurdm sigurdm merged commit 0a6252c into dart-lang:dependency_services Feb 4, 2022
sigurdm added a commit that referenced this pull request Feb 4, 2022
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.

4 participants