pub icon indicating copy to clipboard operation
pub copied to clipboard

Infinity character in some shells is incorrectly shown

Open asashour opened this issue 3 years ago • 4 comments

Environment

  • pub version or flutter pub version: 2.18.0-98.0.dev
  • OS version: Windows 10
  • I am behind a corporate fiewall.

Problem

  1. 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-∞

  2. does <2.0.0-∞ make sense? I understand this is as "less than 2", and infinity? I guess <2.0.0 should be enough.

Steps:

  • checkout Dart SDK.
  • change /pkg/analysis_server/pubspec.yaml to have linter: ^0.1.30
  • run pub get from 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.

asashour avatar May 16 '22 14:05 asashour

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.

jonasfj avatar May 19 '22 09:05 jonasfj

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).

jonasfj avatar May 19 '22 09:05 jonasfj

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.

asashour avatar May 19 '22 09:05 asashour

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.

sigurdm avatar Sep 25 '25 09:09 sigurdm