Closed (fixed)
Project:
Drupal core
Version:
9.1.x-dev
Component:
rdf.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
4 Feb 2020 at 09:17 UTC
Updated:
2 Nov 2020 at 19:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
xjmI'd go for rewriting the trait and dropping the dependency, since it's barely maintained.
Comment #3
xjmWe could also probably get away with dropping the dependency during beta (though maybe not RC) in order to avoid it being in our lockfile until D10.
Comment #4
sanduhrsThe pull request has been merged: https://github.com/easyrdf/easyrdf/pull/311
Also, they are trying to establish a broader maintenance model and are heading for a 1.0 release: https://github.com/easyrdf/easyrdf/issues/320
Comment #5
sanduhrsComment #7
jungleRe #5. Instead of
dev-master,I would suggest using1395e5d6ed9ee8efbb4c76ef7227ec69b271616b as 1.0.0, doing so we get a fixed commit locked.Comment #8
sanduhrsAdded the alias, also added the codesniffer suggestions.
Comment #10
alexpottSo the problem with this approach is that there definitely is contrib that is using the EasyRdf library. So updating it will break those projects :(
At some point though we need to address this because I don't think the current version is Composer2 compatible and Drupal 9 definitely needs to be D9 compatible.
One thing that's good for D9 is that it is only a dev dependency so in order to be D9 compatible these projects should have already declared their dependency in their composer.json - however I wonder how many have done... here's the list of projects and some info.
Comment #11
sanduhrsAs far as I can tell, the main difference between 0.9.8 and 0.10.0-alpha.1 (and upcoming 1.0.0) compatibility wise is namespaces and changed class names. That should be rather easy to update.
So, for Drupal 9 we would be free to either update the dependency in --dev or remove it?
For Drupal 8 we'd need contrib to explicitly require an updated version and update their code?
We have two modules that already require a newer version that should be (mostly) compatible with the upcoming 1.0.0 release.
We have 5 that rely on core shipping the library, after a quick look, updating them should be really, really easy.
For RDFUI I've already done this, now waiting for git access, see https://github.com/sanduhrs/drupal-rdfui and https://www.drupal.org/project/rdfui/issues/3155327
And we have one that explicitly requires the 0.9.x version, updating this should also be relatively easy.
I'd suggest to inform the maintainers of the needed changes.
They should declare the dependency and update the code to work with the upcoming 1.0.0.
Where they do not respond, I'd be willing to provide initial patches - so existing users still have the possibility to update their setups.
Comment #12
alexpottYep it's not a tricky update but it is a breaking update. And the situation for D9 is simpler because I think upgrading the dev dependency is okay - we don't ship with it in the tarball and it is included in the composer project. But unfortunately for D8 the situation is more complex because whilst easyrdf is only used in tests it is a production dependency
+1 for creating an issue on every project. I also think we need some wider communication about when this is going to happen for D8 because I think we need D8 to be composer2 compatible.
So the question is do we need to touch Drupal 8? I'm not sure we do. At least atm update using composer 2 works on Drupal 8 and there are no warnings or anything during a regular install. You only get a warning when doing composer dump-autoload --optimize so it's not that bad imo. So maybe the thing to do here is upgrade Drupal 9 because it is a dev dependency and tell projects to that this is going to happen. And we could also change the composer.json in Drupal 8 to allow v1 of easyrdf once it exists but continue to allow 0.9 and leave the lock file alone - so projects that want to upgrade can - or something like that.
Comment #13
sanduhrsFine with that.
Attached is an updated patch for D9 updating the --dev dependency
and a patch for D8 allowing for an updated library through contrib.
Comment #14
sanduhrsComment #15
sanduhrsComment #18
alexpottI think we should wait until there is actually a 1.0.0 release - hopefully that'll be soon but things have taken time with easyrdf before. But we definitely should do the work on communicating what contrib needs to do. Which is to ensure they have a composer.json with the correct dependency version and in the correct place i.e. prod or dev.
Comment #19
jungle1.0.0-rc.1 was out, FYI. https://github.com/easyrdf/easyrdf/releases/tag/1.0.0-rc.1
Comment #20
sanduhrseasyrdf has an 1.0.0 release, now.
Patch attached.
Comment #21
alexpottYay to see the back of the class_alias fudge...
Should be "^1.0"
Comment #22
sanduhrs^1.0 it is!
Comment #23
sanduhrsComment #24
alexpott@sanduhrs Drupal 8 is much much harder than Drupal 9 because easyrdf is incorrectly not a dev dependency. So we can't do that - our usage in Drupal 8 is not compatible. We'd need to fix the our usage to work with either version - so min/max testing...
Comment #26
alexpott@sanduhrs I think we should only do Drupal 9 in this issue and then tackle Drupal 8 in a separate issue. It's going to need very different code changes.
Comment #27
sanduhrsActually a few more class aliases might work ;)
Or should we go for conditional class usage in the trait's methods?
Comment #28
sanduhrsComment #29
alexpott@sanduhrs we need to fix Drupal 9 first. Let's make the latest patch the Drupal 9 patch - discuss and review that and then deal with Drupal 8 - it's way more complicated because we're not even testing with easyrdf 1.0.0 because of how DrupalCI works.
FWIW on D8 patch...
^0.9 | ^1.0 unless we're not compatible with 0.10.0 in which case... ">=0.9.0 <0.10.0 | ^1.0" is what it should be but we should be careful with that cause some contrib requires 0.10... as far as I remember. But again let's fix D9 first.
Comment #30
sanduhrsReattached the patch for D9 from #22.
- It requires easyrdf/easyrdf: ^1.0 as a dev dependency
- It removes the workaround from #3110972: Update easyrdf library to 1.0.0
- It updates \EasyRdf usage to use namespaces
Tests passed already in #22.
What's left to be done?
Comment #32
alexpottI think as this is a dependency update I think we need a change record. It's a bit tricky because it only affects dev dependencies but we do ship dev dependencies as a package so I think we need one.
Comment #33
sanduhrsHere is a draft change record https://www.drupal.org/node/3159977
Comment #34
sanduhrsComment #35
samiullah commentedTested the latest patch on local instance of drupal 9.1.x
Checked if easyrdf is updated to 1.0.0 version
Looks good
This can be moved to RTBC if code review is fine
Comment #36
jungle@samiullah, thanks for the review.
But in general, you do not have to attach any screenshots, unless it's asked. For example: tagged Needs manual testing.
Attaching screenshot of patch applying, which might be taken as a behavior of credit gaming by committer.
CR added. removing the Needs change record tag.
Comment #37
jungle@sanduhrs's "self-review" is good. besides, the link to the workaround issue points THIS, it should be #3090017: Isolate test dependency on easyrdf/easyrdf to a single trait
Thanks!
Comment #38
catchNeeds a re-roll.
Comment #39
sanduhrsComment #40
sanduhrsHo can I prevent composer from updating the metapackages?
Did not have this issue before :/
Comment #41
sanduhrsAttached is a patch that includes the metapackage updates.
Comment #42
sanduhrsComment #44
alexpott@sanduhrs the meta packages need updating.
Comment #45
raman.b commentedPatch #41 no longer applies. Re-rolling.
Comment #47
raman.b commentedUnrelated test failure.
Triggering test again
Comment #48
jungleFYI, following warnings got while running
composer installagainst Drupal core 9.0.7Comment #49
jungleAttaching a raw interdiff for #45.
Updated
composer.lockwithcomposer update --lock -vvvandComposer version 2.0.0-RC1 2020-09-10 15:39:45Comment #50
jungleAll changes in
interdiff-45-49.txtaresupportkey added to each packages. See https://getcomposer.org/doc/04-schema.md#support. So if #49 passes, I would set it to RTBC.Comment #51
andypostthis change looks unrelated
Comment #52
jungleThanks, @andypost!
Started from #45 again with
Composer version 1.10.13 2020-09-09 11:46:34And got
composer.lockupdated withcomposer update --lock -vvv, revertedMeanwhile, as https://www.drupal.org/project/drupal/releases/9.0.7 tagged with Composer 2.0.0-RC1 already, maybe it's time and it's ok switching to "plugin-api-version": "2.0.0".
Comment #53
andypostI think it's ready
@jungle I think the related issue is #3103918: [policy + docs] Decide on backwards compatibility policy for Composer plugins in Drupal 8
Comment #54
samiullah commentedComment #55
catch@alexpott asked me to look at the issues raised in #10.
Only one of these modules is both stable and Drupal 9 compatible: https://www.drupal.org/project/wisski, and this patch will break it by the looks of things. I think we should file an issue asking them to loosen to ^0.9|^1.0 or similar before this goes in. (And the other modules too, but they already have other work to do to become Drupal 9 compatible and/or stable).
For Drupal 8... I think we just can't commit this to Drupal 8 and it won't fully support Composer 2 (but de facto, it mostly does), agree with #3110972-12: Update easyrdf library to 1.0.0:
I do think we should continue trying to remove the dependency altogether, either by refactoring, or #2152459: [Policy] Deprecate RDF module and move it to contrib.
Comment #56
alexpottI opened #3176365: Drupal 9 would like to move to v1 of easyrdf
Comment #57
alexpottThinking about this I think we can support both 0.9 and 1.0 in core and then make contrib's / custom life a bit simple unless they are using drupal/core-dev-pinned which not many are.
We can introduce two new private functions getEasyRdfParser and getEasyRdfGraph
And do something like
We'd still dev pin to 1.0 but and remove our PHP 7.4 compatibility layer - but we won't break any projects tests like Wisski. And they can upgrade in their own time. In Drupal 10 we can remove support for 0.9 early.
Comment #58
jungleAddresing #57
Comment #59
alexpottThanks @jungle - this needs a change too...
^0.9 | ^1.0and then the composer templates will need rebuildingComment #60
andypostThen it needs todo and d10 issue
Comment #61
jungleAddressed #59, added a D10 issue #3176468: Remove support for EasyRDF 0.9 and @todo
Thanks!
Comment #62
andypostLooks ready, thanks!
Comment #63
andypostMissed to change status
Comment #64
alexpottI've run \Drupal\Tests\rdf\Functional\CommentAttributesTest with both 0.9 and 1.0 and it works great. I think this is a good pragmatic step to getting everyone who is use EasyRDF onto the 1.0 release.
Comment #66
alexpottCommitted 89d9f11 and pushed to 9.1.x. Thanks!
Comment #67
alexpottComment #68
jungleSorry, forgot to mention. I have not found docs for the usage of single pipe (|) in composer versions and constraints. Not sure if a single pipe (|) is treated as OR per the official docs here for Version Range, @alexpott suggested to use the single pipe (|) in #59, in the patch #61, I used double pipe (||).
Comment #69
jungleFor the warnings mentioned in #48, I would suggest backporting this to 9.0.x. In addition, the release note of 9.0.7 says "This release has been tagged with Composer 2.0.0-RC1. Please report any issues in the Drupal core issue queue.", this is another reason to me to backport this. Please set to NW if you agree.
Comment #70
jungleSelf-reply to #68
That means double pipe (||) is preferred.
Thanks @voleger guided me here to find it.
Comment #71
alexpottPublished change record (which, I think, anyone can do).
Comment #72
alexpottI'm not sure this is worth a release notes mention but tagging because it is a dependency (of sorts) update.
Comment #73
claudiu.cristea@alexpott, Can we, at least, in 8.9.x, move
easyrdf/easyrdffromrequire(./core/composer.json) torequire-dev(./composer.json)? As is now it prevents me updating to 1.0.0 and this is a pain as we plan to stay on 8.9.x more months for nowComment #74
claudiu.cristeaI've opened a follow-up for 8.9.x #3176975: Allow updating easyrdf/easyrdf on 8.9.x.
Comment #75
catchComment #76
xjm