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

Beta versions aren't properly installed #111

Open
hifihedgehog opened this issue Apr 20, 2018 · 5 comments
Open

Beta versions aren't properly installed #111

hifihedgehog opened this issue Apr 20, 2018 · 5 comments

Comments

@hifihedgehog
Copy link

hifihedgehog commented Apr 20, 2018

Steps to reproduce

  1. Install Gamification by ReFlar (installs v2.0.3)
  2. Select Update in Gamification's dropdown menu to try to force Bazaar to grab latest release (also installs v2.0.3)

Expected behaviour

It should be grabbing the latest release (a beta) of Gamification (v3.0.0-beta.2). Note that this is what the developer (and I) would expect.
https://discuss.flarum.org/d/11253-installing-beta-release-of-gamification-by-reflar-via-bazaar/3

Actual behaviour

Whether fresh installing the extension or attempting an update afterward, it instead grabs the latest stable release (v2.0.3) of Gamification.

Configuration

Operating system:
Shared hosting
Version of Bazaar:
0.2.4
Version of Flarum:
0.1.0-beta.7
Other extensions:

**Logs**: Insert logs here (if necessary)
@clarkwinkelmann
Copy link
Contributor

There's indeed an issue here. Bazaar does not install the advertised version of the extension, but does its own calculation to find the best version.

I've not gotten to the bottom of it yet, but it looks like under some conditions it's not taking betas into consideration...

You'll have to install the beta version of the extension via the command line until we fix this. Sorry.

@hifihedgehog
Copy link
Author

hifihedgehog commented Apr 21, 2018

Just to add some added insight, I recently found out that Composer is also affected with Gamification and is not calculating the betas properly in the precedence sort before selecting the version to install. Because of this, I have to manually select the beta version as a parameter in the command line with Composer.

@clarkwinkelmann
Copy link
Contributor

is not calculating the betas properly in the precedence sort before selecting the version to install

Actually, it does. "minimum-stability": "beta" allows beta versions, while "prefer-stable": true forces to choose a stable version over a beta version if you don't explicitly give the version constraint.

see https://getcomposer.org/doc/04-schema.md#prefer-stable

The only Bazaar issue is that while it shows the latest beta in the UI, it installs the latest version according to your prefer-stable value, which by default does not match with what is displayed.

@luceos
Copy link
Member

luceos commented Apr 23, 2018

I think I removed the ability to set a specific version to require in Bazaar at some point because we weren't using it. What we should do now is possibly starting to use the version we receive from flagrow.io within the require command. Flagrow.io is far better at identifying compliance between current Flarum versions and extensions because it has an higher understanding of backward breaking changes inside core.

We should most likely use that version is the minimum and it should download the correct package, what do you think @clarkwinkelmann ?

@luceos luceos changed the title Installing ReFlar Gamification, It Does Not Grab The Latest Release Beta versions aren't properly installed Apr 23, 2018
@clarkwinkelmann
Copy link
Contributor

@luceos there are still many things flagrow.io doesn't know about the local install. There could be a PHP platform definition, or other PHP/extensions requirements in the local composer file which would make a simple require with the API version fail.

Maybe we should just do multiple checks locally. Find the latest stable, beta (, alpha?) version available, and let the user choose when installing.

Or we could send the relevant data to flagrow.io (php version, extensions installed, version/extension/platform requirements from composer.json) and let the API process those, and return a list of best options.

In my opinion installing beta versions should be let to the user choice. We can't just start installing beta versions of everything by default...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants