Infinity character in some shells is incorrectly shown
Environment
-
pub versionorflutter pub version:2.18.0-98.0.dev - OS version: Windows 10
- I am behind a corporate fiewall.
Problem
-
On trying to play around with Dart SDK versions to get latest linter, I came across a message of
<2.0.0-∞, which seems to be incorrect, but in another shell it is shown as<2.0.0-∞ -
does
<2.0.0-∞make sense? I understand this is as "less than 2", and infinity? I guess<2.0.0should be enough.
Steps:
- checkout Dart SDK.
- change
/pkg/analysis_server/pubspec.yamlto havelinter: ^0.1.30 - run
pub getfrom IntelliJ.
Expected behavior
The version should always be visible, in all shells.
Actual behavior
<2.0.0-∞ is shown
--trace output
The current Dart SDK version is 2.18.0-98.0.dev.
Because every version of analyzer_plugin from path depends on yaml ^3.1.0 and linter >=0.1.57 <1.0.0 depends on yaml ^2.1.2, analyzer_plugin from path is incompatible with linter >=0.1.57 <1.0.0.
And because linter >=0.0.2+1 <0.1.57 requires SDK version <2.0.0-∞, analyzer_plugin from path is incompatible with linter >=0.0.2+1 <1.0.0.
So, because analysis_server depends on both analyzer_plugin from path and linter ^0.1.30, version solving failed.
From the Terminal, which is using another shell:
The current Dart SDK version is 2.18.0-98.0.dev.
Because every version of analyzer_plugin from path depends on yaml ^3.1.0 and linter >=0.1.57 <1.0.0 depends on yaml ^2.1.2, analyzer_plugin from path is incompatible
with linter >=0.1.57 <1.0.0.
And because linter >=0.0.2+1 <0.1.57 requires SDK version <2.0.0-∞, analyzer_plugin from path is incompatible with linter >=0.0.2+1 <1.0.0.
So, because analysis_server depends on both analyzer_plugin from path and linter ^0.1.30, version solving failed.
We discussed this a bit, and figured out that we probably can't avoid having to use a special character of some sort.
But maybe we can change it to \infinity based on terminal detection.
Context: We need to write <2.0.0-∞ because the upper-bound comes from >=2.0.0-dev <2.0.0 which means that the <2.0.0 part is not interpreted as <2.0.0-0 which otherwise would (this is done to exclude prereleases).
Thanks for explaining.
As a humble user, I initially understood it as "lower bound is<2.0.0 and upper bound ∞".
I am also not sure if ∞ is an intuitive representation of 'release versions', as I now possibly understand.
I wonder why the symbol doesn't come out right. What terminal are you using (if you still remember)? Most terminals would support utf8 based output today. We use a few other unicode symbols in the pub output Maybe we can do something better with regards to output encoding. Just not sure what.