Composer does not know mediawiki/mediawiki on dry-runs

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Composer does not know mediawiki/mediawiki on dry-runs

Wikipedia Developers mailing list

When running `composer update` MediaWiki injects a mediawiki/mediawiki package, so extensions can declare a dependency on a particular MW version range.
However, when doing a `composer update --dry-run` this package gets not injected causing the dry run to fail.

Does anybody know a solution/workaround?

Stephan





_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Composer does not know mediawiki/mediawiki on dry-runs

David Barratt
as far as I know, extensions shouldn't be declaring a dependency on
MediaWiki in composer.json and if one is, it should probably be fixed.

On Fri, Nov 15, 2019 at 9:50 AM Stephan Gambke via Wikitech-l <
[hidden email]> wrote:

>
> When running `composer update` MediaWiki injects a mediawiki/mediawiki
> package, so extensions can declare a dependency on a particular MW version
> range.
> However, when doing a `composer update --dry-run` this package gets not
> injected causing the dry run to fail.
>
> Does anybody know a solution/workaround?
>
> Stephan
>
>
>
>
>
> _______________________________________________
> Wikitech-l mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Composer does not know mediawiki/mediawiki on dry-runs

Wikipedia Developers mailing list
In reply to this post by Wikipedia Developers mailing list
To enable extensions to declare a version constraint on MW, so an incompatible version of an extension is not installed in the first place instead of crashing MW later on.

Stephan

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Friday, November 15, 2019 4:27 PM, Florian Schmidt <[hidden email]> wrote:

> Extensions can express a dependency to mediawiki core in their extension.json. not sure where, how and why a non-existing composer package should be injected to a composer run.
>
> Am 15.11.2019 10:15 schrieb David Barratt <[hidden email]>:
>
>> as far as I know, extensions shouldn't be declaring a dependency on
>> MediaWiki in composer.json and if one is, it should probably be fixed.
>>
>> On Fri, Nov 15, 2019 at 9:50 AM Stephan Gambke via Wikitech-l <
>> [hidden email]> wrote:
>>
>>>
>>> When running `composer update` MediaWiki injects a mediawiki/mediawiki
>>> package, so extensions can declare a dependency on a particular MW version
>>> range.
>>> However, when doing a `composer update --dry-run` this package gets not
>>> injected causing the dry run to fail.
>>>
>>> Does anybody know a solution/workaround?
>>>
>>> Stephan
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Wikitech-l mailing list
>>> [hidden email]
>>> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
>> _______________________________________________
>> Wikitech-l mailing list
>> [hidden email]
>> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Composer does not know mediawiki/mediawiki on dry-runs

Wikipedia Developers mailing list
In reply to this post by David Barratt
See https://github.com/wikimedia/mediawiki/commit/3307d4957925df319df2b84cfc3e6f1680d0632a

"This change allows extensions to specify they depend on a specific version or version range of MediaWiki. This is done by adding the package mediawiki/mediawiki in their composer.json require section."

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Friday, November 15, 2019 4:15 PM, David Barratt <[hidden email]> wrote:

> as far as I know, extensions shouldn't be declaring a dependency on MediaWiki in composer.json and if one is, it should probably be fixed.
>
> On Fri, Nov 15, 2019 at 9:50 AM Stephan Gambke via Wikitech-l <[hidden email]> wrote:
>
>> When running `composer update` MediaWiki injects a mediawiki/mediawiki package, so extensions can declare a dependency on a particular MW version range.
>> However, when doing a `composer update --dry-run` this package gets not injected causing the dry run to fail.
>>
>> Does anybody know a solution/workaround?
>>
>> Stephan
>>
>> _______________________________________________
>> Wikitech-l mailing list
>> [hidden email]
>> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Composer does not know mediawiki/mediawiki on dry-runs

Lucas Werkmeister
That was six years ago, predating extension registration – I would assume
that nowadays extensions are supposed to declare their compatible MediaWiki
versions in extension.json
<https://www.mediawiki.org/wiki/Manual:Extension_registration#Requirements_(dependencies)>
(details
<https://www.mediawiki.org/wiki/Manual:Extension.json/Schema#requires>).

Cheers,
Lucas

Am Fr., 15. Nov. 2019 um 16:38 Uhr schrieb Stephan Gambke via Wikitech-l <
[hidden email]>:

> See
> https://github.com/wikimedia/mediawiki/commit/3307d4957925df319df2b84cfc3e6f1680d0632a
>
> "This change allows extensions to specify they depend on a specific
> version or version range of MediaWiki. This is done by adding the package
> mediawiki/mediawiki in their composer.json require section."
>
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> On Friday, November 15, 2019 4:15 PM, David Barratt <
> [hidden email]> wrote:
>
> > as far as I know, extensions shouldn't be declaring a dependency on
> MediaWiki in composer.json and if one is, it should probably be fixed.
> >
> > On Fri, Nov 15, 2019 at 9:50 AM Stephan Gambke via Wikitech-l <
> [hidden email]> wrote:
> >
> >> When running `composer update` MediaWiki injects a mediawiki/mediawiki
> package, so extensions can declare a dependency on a particular MW version
> range.
> >> However, when doing a `composer update --dry-run` this package gets not
> injected causing the dry run to fail.
> >>
> >> Does anybody know a solution/workaround?
> >>
> >> Stephan
> >>
> >> _______________________________________________
> >> Wikitech-l mailing list
> >> [hidden email]
> >> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
> _______________________________________________
> Wikitech-l mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l



--
Lucas Werkmeister (he/er)
Full Stack Developer

Wikimedia Deutschland e. V. | Tempelhofer Ufer 23-24 | 10963 Berlin
Phone: +49 (0)30 219 158 26-0
https://wikimedia.de

Imagine a world in which every single human being can freely share in the
sum of all knowledge. Help us to achieve our vision!
https://spenden.wikimedia.de

Wikimedia Deutschland - Gesellschaft zur Förderung Freien Wissens e. V.
Eingetragen im Vereinsregister des Amtsgerichts Berlin-Charlottenburg unter
der Nummer 23855 B. Als gemeinnützig anerkannt durch das Finanzamt für
Körperschaften I Berlin, Steuernummer 27/029/42207.
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Composer does not know mediawiki/mediawiki on dry-runs

Brad Jorsch (Anomie)
On Fri, Nov 15, 2019 at 11:06 AM Lucas Werkmeister <
[hidden email]> wrote:

> That was six years ago, predating extension registration – I would assume
> that nowadays extensions are supposed to declare their compatible MediaWiki
> versions in extension.json
> <
> https://www.mediawiki.org/wiki/Manual:Extension_registration#Requirements_(dependencies)
> >
> (details
> <https://www.mediawiki.org/wiki/Manual:Extension.json/Schema#requires>).
>

It also predated T467 RfC: Extension management with Composer
<https://phabricator.wikimedia.org/T467>, which rejected the proposal to
manage extensions via composer.

I think you assume correctly.

--
Brad Jorsch (Anomie)
Senior Software Engineer
Wikimedia Foundation
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Composer does not know mediawiki/mediawiki on dry-runs

Max Semenik
On Fri, Nov 15, 2019 at 8:16 AM Brad Jorsch (Anomie) <[hidden email]>
wrote:

> It also predated T467 RfC: Extension management with Composer
> <https://phabricator.wikimedia.org/T467>, which rejected the proposal to
> manage extensions via composer.


Which raises the question: should this functionality stay in MediaWiki at
all?

--
Best regards,
Max Semenik ([[User:MaxSem]])
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Composer does not know mediawiki/mediawiki on dry-runs

Sam Wilson
Where does the mediawiki/mediawiki package come from? It's no longer on
Packagist; how does Composer know where to get it? It should certainly
not appear as a requirement for any package.

As for removing the functionality: do you mean the functionality of the
Composer merge plugin? i.e. that we can load dependencies in the
MediaWiki root directory, rather than within each extension's directory?

On 15/11/19 7:16 pm, Max Semenik wrote:

> On Fri, Nov 15, 2019 at 8:16 AM Brad Jorsch (Anomie) <[hidden email]>
> wrote:
>
>> It also predated T467 RfC: Extension management with Composer
>> <https://phabricator.wikimedia.org/T467>, which rejected the proposal to
>> manage extensions via composer.
>
> Which raises the question: should this functionality stay in MediaWiki at
> all?
>

_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Composer does not know mediawiki/mediawiki on dry-runs

Max Semenik
On Fri, Nov 15, 2019 at 7:19 PM Sam Wilson <[hidden email]> wrote:

> Where does the mediawiki/mediawiki package come from? It's no longer on
> Packagist; how does Composer know where to get it? It should certainly
> not appear as a requirement for any package.
>

ComposerHookHandler adds it programmatically.

As for removing the functionality: do you mean the functionality of the
> Composer merge plugin? i.e. that we can load dependencies in the
> MediaWiki root directory, rather than within each extension's directory?
>

I mean ComposerHookHandler and friends.


--
Best regards,
Max Semenik ([[User:MaxSem]])
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Composer does not know mediawiki/mediawiki on dry-runs

Max Semenik
In reply to this post by Max Semenik
On Fri, Nov 15, 2019 at 4:16 PM Max Semenik <[hidden email]> wrote:

> Which raises the question: should this functionality stay in MediaWiki at
> all?
>

I've pushed https://gerrit.wikimedia.org/r/551346 for review.

Best regards,
Max Semenik ([[User:MaxSem]])
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l