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

How many fish version should we support? #123

Closed
edouard-lopez opened this issue Jan 10, 2019 · 23 comments
Closed

How many fish version should we support? #123

edouard-lopez opened this issue Jan 10, 2019 · 23 comments
Labels
❓discussion understanding the project and its choices
Milestone

Comments

@edouard-lopez
Copy link
Member

edouard-lopez commented Jan 10, 2019

As I'm updating the .travis.yml config to run our tests against multiple versions, I'm wondering how many fish versions should we support?

Currently TravisCI build:

  • ✔️ succeed against 2.5.0, 2.6.0, 2.7.1,
  • 🔴 fail against 2.4.0 and 3.0.0.

What support strategy should we adopt here?
@rafaelrinaldi @schrodincat @jorgebucaran @faho

@edouard-lopez
Copy link
Member Author

I submitted a poll to the community (fish-shell/fish-shell#5507) to get usage feedback.

@andreiborisov
Copy link
Collaborator

I’d say we support only 2.7 and 3. I see no reason to stay on older versions from a user point of view, since there is no backwards incompatible changes between minor updates.

@faho
Copy link
Contributor

faho commented Jan 10, 2019

I'm always looking at supported Ubuntu releases - https://packages.ubuntu.com/search?suite=all&searchon=names&keywords=fish:

trusty (14.04LTS): 2.0.0-1
xenial (16.04LTS): 2.2.0-3
bionic (18.04LTS): 2.7.1-3
cosmic (18.10): 2.7.1-3build1

Trusty is only supported for another 3 months, and all of these are supported by the official PPA (with 3.0!). 19.04 will have 3.0.

But in the end it depends on how much pain it causes to support older releases - anything < 2.3.0 is rough because those lack string, which means you'd have to fall back to sed and grep, at which point you're almost dealing with another language. Snippets also were only introduced in 2.3.0.

In contrast, 2.4.0 didn't have as many big changes when it comes to scripting - it added the realpath builtin and changed how ^ redirections were handled. It did add math -s (but not the short --scale).

2.5.0 added the subcommand-style to status (status is-interactive instead of status --is-interactive), though both remain supported. It also adds command -sq.

2.6.0 added disown and fixed (fzf).

2.7.0 added argparse, allowed invalid array indices, a few nice additions to string, setting $COLUMNS and $LINES correctly.

3.0.0 added better set -lx, a new math builtin, a rather important fix to index ranges ($var[2..-1] expanded to $var[1] if i didn't have 2 elements in 2.7.0, and errored out before), "logical" $PWD, the path variable changes, && et al, the wait builtin, bind --preset, ....


So, the biggest pain point is probably 2.2.0. Anything before that, you can safely ignore, but the difference between what you'd write in 2.2.0 and what you'd write in 2.3.0 is massive.

2.4.0 is probably most important because of math -s - otherwise you'd have to truncate numbers to integers manually for compatibilitiy with 3.0, if you need that. (i.e. math -s0 2 / 3 or math 2 / 3 | string replace -r '\..*' '')

2.5.0's command -sq is nice, but not all that necessary.

2.6.0 doesn't have much interesting for us, 2.7.0's argparse is big, 3.0.0 is massive.

@edouard-lopez
Copy link
Member Author

Thanks for your knowledgeable feedback.

I was not really looking to support below 2.4 due to the merge of #91 who set it as a minimal requirement since we use math -s0. Moreover, as @faho mentioned the time and effort required to maintain all those versions should be taken into account, hence the poll.

@faho
Copy link
Contributor

faho commented Jan 10, 2019

Okay, the tests on 2.4.0 fail for two reasons:

  • It didn't have fish_default_mode_prompt

  • It didn't have status $subcommand, so status something prints output before it fails

3.0 fails because of $hostname and the fish_title isn't completely correct.

I think the following should work for 2.4.0's status:

    set --local current_command (status current-command 2>/dev/null)
    or set --local current_command $_

and you'd have to figure something out for the default mode prompt.

@edouard-lopez
Copy link
Member Author

✔️ 2.5, 2.6, 2.7.1 and 3.0.0

Tests successfully run against 2.5, 2.6, 2.7.1 and 3.0.0 on CI 😎

🔴 2.4

Supporting 2.4 should be possible, as only 4 tests fail:

# tests 122
# pass  118
# fail  4

However, I removed it from the CI configuration bdb8710 cause the trade-off time invested/benefit isn't worth it from my point of view as I want to focus on other projects.

🙏 Contribute

If you want to investigate there is a makefile that can help you get started and run tests in docker containers:

❯ make
usage:  make build-pure-on FISH_VERSION=3.0.0   # build container
        make test-pure-on  FISH_VERSION=3.0.0   # run tests
        make dev-pure-on   FISH_VERSION=3.0.0   # dev in container

You might be interested by the helpers to condition tests execution, based on the $FISH_VERSION (cf.
_pure_prompt_ssh_host.test.fish.

🚀 Docker

Running in a docker image require to adapt some of our code, hence the use of some short form option on some executable (e.g. sort, hostname, etc. See #127). Still prefer long form if possible.

@edouard-lopez edouard-lopez added this to the 2.x milestone Jan 12, 2019
@rafaelrinaldi
Copy link
Collaborator

I'd personally suggest current version and one prior and print a warning for other users asking to upgrade. It would be easier to maintain and ensure a better experience.
However with the adjustments made after @faho's comments, I believe 2.5+ support sounds reasonable. As long as it's easy enough to maintain.

@edouard-lopez
Copy link
Member Author

edouard-lopez commented Jan 13, 2019

Thanks everyone,

I will update to indicate fish-2.5 as a requirement in the readme.

Also Adding a message at session start-up to notify the user he should upgrade would be a nice feature!

Created issue #131 for that purpose.

@smorimoto
Copy link
Contributor

It seems like Pure already supports fish 3. Isn't it supported yet?

@edouard-lopez
Copy link
Member Author

@imbsky we do support fish 3.0.0. I define supported as test passing against said version

@smorimoto
Copy link
Contributor

smorimoto commented Jul 25, 2019

@edouard-lopez I thought so... This warning made me very confused. So I just created a PR #185 .

@edouard-lopez edouard-lopez reopened this Nov 15, 2020
@edouard-lopez
Copy link
Member Author

edouard-lopez commented Nov 15, 2020

Based on @faho idea, I would like to restrict our support to versions available, by default, and above, in supported Ubuntu LTS and current Ubuntu release only. So, as of Nov. 15 2020 we have:

  • xenial (16.04LTS): 2.2.0-3 we won't go back to this as we already decided to support above ≥2.5
  • bionic (18.04LTS): 2.7.1-3
  • focal (20.04LTS): 3.1.0-1.2
  • groovy (shells): 3.1.2-1ubuntu1

Henceforth we should:

  • ❌ drop support for 2.5, 2.6 officially
  • ✔️ set lowest supported version to 2.7.1
  • 🎉 introduce support for 3.1.0 and above

What do you think?

@jorgebucaran
Copy link
Contributor

Support >=3.0, otherwise we'll be stuck in 2.7.1 until 2023 for no substantial benefit. Bionic/Cosmic users can upgrade to the latest Fish easily enough.

@smorimoto
Copy link
Contributor

Strange behavior seems to occur at startup.

fish version: 3.1.2

image

@edouard-lopez
Copy link
Member Author

Thanks @jorgebucaran
So we can restrict our support to the current major Fish version only (currently 3.x) as it's avaible to plenty of old Ubuntu releases thanks to the official Fish PPA. So we should:

  • ❌ drop support for 2.5, 2.6 and 2.7.1 officially
  • ✔️ set lowest supported version to 3.0.0
  • 🎉 introduce support for 3.1.0 and above

@jorgebucaran
Copy link
Contributor

@smorimoto Could you create a different issue for that? Not sure what's wrong with that picture, though.

@edouard-lopez Sounds good! 🎉

@smorimoto
Copy link
Contributor

smorimoto commented Nov 17, 2020

@jorgebucaran Of course. Ah, it was a little hard to understand with the image.

gif

@jorgebucaran
Copy link
Contributor

@smorimoto Maybe you have a fish_greeting.fish file somewhere doing something weird? Look in your $__fish_config_dir.

@smorimoto
Copy link
Contributor

@jorgebucaran I'm specifying an empty for that; is that a problem? ​This behavior did not occur before.

@jorgebucaran
Copy link
Contributor

@smorimoto Nope, that shouldn't be the issue AFAIK. This seems like a Fish specific issue, so I'd suggest asking in https://gitter.im/fish-shell/fish-shell.

@smorimoto
Copy link
Contributor

The default prompt for fish doesn't cause this, and it happened after updating fisher and pure.

@edouard-lopez
Copy link
Member Author

I'm closing the issue as we have a new support strategy.

@smorimoto Please open a dedicated issue so we have a clear thread.

@edouard-lopez
Copy link
Member Author

Versions Support Strategy has been added to the wiki for reference

This was referenced Nov 23, 2020
edouard-lopez added a commit that referenced this issue Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
❓discussion understanding the project and its choices
Projects
None yet
Development

No branches or pull requests

6 participants