Closed (fixed)
Project:
Libraries API
Version:
8.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Dec 2020 at 12:16 UTC
Updated:
16 Jun 2021 at 04:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
ressaComment #3
ressaAdding a patch.
Comment #8
ressaTrying with the new Gitlab integration in stead :)
Comment #9
joseph.olstadlatest release should fix this
8.x-3.0-alpha3
Comment #10
ressaThanks for the new release. I just tried with https://ftp.drupal.org/files/projects/libraries-8.x-3.0-alpha3.tar.gz but got the same error:
Comment #11
joseph.olstadOk @ressa I merged your merge request, thanks! it looks good this fixes one automated test, only one failure now
I will publish alpha4
Comment #12
joseph.olstadThe merge had to be done on the command line, in the process I wasted a tag on alpha4
so I had to re-tag with alpha5
pushing alpha5
Comment #13
joseph.olstadComment #14
joseph.olstadthis change seems to have broken a test in the automated testing
Comment #15
joseph.olstadComment #16
joseph.olstadthere were two broken tests prior to this change, now there are 3
Comment #17
joseph.olstadI reverted this change, caused test error, however please keep working on this, there's still one test fail.
Comment #18
ressaSorry about the extra releases. I had a look in the code, and there is a reference to an issue, which actually mentions that Libraries API is special, when it comes to testing: #1606606: Drupal.org release packager corrupts info files that are not modules, themes, or install profiles. I am not sure how to proceed ... perhaps @tstoeckler has an opinion on how to get this working?
Files of interest:
Should
typebe unset, like the other fields are here in line 176 ofsrc/Tests/LibrariesWebTest.php?unset($library['core'], $library['datestamp'], $library['project'], $library['version']);Comment #19
dd 85 commentedCan't upgrade module from 8.x-3.0-alpha1 to 8.x-3.0-alpha6
I get the error
Drupal\Core\Extension\InfoParserException: Missing required keys (type) in temporary://update-extraction-996ccefd/libraries/tests/example/example_info_file.libraries.info.yml in Drupal\Core\Extension\InfoParserDynamic->parse() (line 57 of /core/lib/Drupal/Core/Extension/InfoParserDynamic.php).
Comment #20
ressaWith what method did you update the module?
Comment #21
dd 85 commented/admin/reports/updates/update
Comment #22
joseph.olstadThanks for reporting. If someone can confirm that one of the suggested fixes work please let me know
Comment #23
ressaHi @joseph.olstad. The two patches in this issue (local = #3, GitLab = #7) are identical, adding
type: moduleintests/example/example_info_file.libraries.info.yml, which makes the tests break. So this issue needs more work ...Comment #24
joseph.olstadTesting new patch.
Comment #25
joseph.olstadpatch 24 is passing all green in 8.9.x, adding more
Comment #26
joseph.olstadlooks like a problem with the test runner, 8.9.x is fine
the errors look like caused by a problem on the test runner config.
Comment #27
ressaGreat that you got the test thing working @joseph.olstad.
This issue was originally about not being able to download the module from
/admin/modules/installor update from/admin/reports/updates/update, and addingtype: module. Will the updated test allow this to be added?Comment #28
joseph.olstadTry a rollup patch with your change and the latest patch?
Comment #30
ressaI wasn't sure if I needed to create a new branch, but ended up creating another one. I was a little surprised to see the
type: modulealready there ... this new GitLab system takes some getting used to :) And it looks like the test passes.Comment #32
joseph.olstadComment #33
ressaIt's great that the tests are passing, but technically this issue is not fixed, since
type: moduleis still missing from/tests/example/example_info_file.libraries.info.yml. I tried to re-run the test for #3 (addstype: module) which now includes the patch from #24, but it fails ...Can I ask you to close this no longer relevant Merge Request, @joseph.olstad? https://git.drupalcode.org/project/libraries/-/merge_requests/3
Do you prefer patches uploaded here in the old style, rather than in the new GitLab system?
Comment #34
ressaUpdating Issue Summary to use dev-version as example, as well as add update.
Comment #36
joseph.olstadnot sure if this is needed or not.
Comment #37
joseph.olstadressa, if we add type, do we need to add core version support and the other elements into the info.yml?
I think if we add this we maybe have to add the rest.
Comment #39
ressaThanks for closing that MR @joseph.olstad. Let's try to deal with this issue with the old patch system here.
I found the CR New 'core_version_requirement' key in info.yml files for modules, themes and profiles allows Composer semantic version constraints including specifying multiple major versions of core, perhaps of use? Based on that I am adding a patch which also includes
core_version_requirement: ^8.8 || ^9, let's see what the testbot says.Comment #41
ressaI had a look at the history of
/tests/example/example_info_file.libraries.info.ymland it looks like adding and removing 'type' key has been done before.Comment #42
joseph.olstadyes I already reverted this change because it didn't pass testing.
but there's maybe something else to figure out here
Comment #43
ressaI agree, there is more to be done. My point is, the
typewas first added and deliberately removed a week later in 2013.Comment #44
joseph.olstadComment #45
joseph.olstadtry this
Comment #46
joseph.olstadComment #47
joseph.olstadtrying something.
Comment #48
ressaWhile I think it will be great to get tests working, the issue has now been hijacked, originally about not being able to download and update the module via the GUI.
Wouldn't a better approach be to revert this issue to the original focus (not being able to download the module via GUI) and create a new issue about getting tests working?
Comment #49
joseph.olstadHoping someone else can pick up the ball here.
Comment #50
joseph.olstadressa, how about close this issue and open two new ones.
I'd prefer not breaking tests in order to fix what you're looking to fix
do you have a better solution?
Comment #51
ressaSounds good @joseph.olstad. I'll create a fresh issue for the problem with download/update via GUI. Perhaps you can create one for the test issue?
Comment #52
joseph.olstadressa, your issue was related to the tests, we cannot fix it until we fix the tests and some of them currently do not work on D9 due to the deprecated apis being removed.
Comment #53
ressaI have created #3190825: Download or update via the GUI doesn't work. I guess this issue can be kept open, to make the D9 tests work here?
Comment #54
paulocsFixing tests to drupal 9.
Lets see if they will pass.
Comment #55
paulocsNew patch because I forgot to change one place.
Comment #56
paulocsfinally...
Comment #58
joseph.olstadComment #59
joseph.olstadThanks @paulocs, bravo!