Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
asset library system
Priority:
Major
Category:
Task
Assigned:
Reporter:
Created:
29 May 2014 at 10:02 UTC
Updated:
15 Jan 2015 at 03:56 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
wim leersComment #2
corbacho commentedIf test passes, this patch is ready IMHO. The license links were reviewed in the parent issue already:
https://drupal.org/node/2258313#comment-8749623
Comment #4
corbacho commentedPatch is missing the file
library_test_files/licenses.libraries.yml?Comment #5
sunStill wondering whether we can find a shorter name for this key...
Since "gpl-compatible" is not fully accurate anyway (as it would have to be "gplv2-compatible"), perhaps we can shorten it to just "compatible"?
The specified URLs are inconsistent — some are linking to the latest version in the mainline/master branch, some others are linking to the exact version of the included library.
While it would probably be accurate to link to the version-specific license, I fear that people will forget to update this URL when updating a library...
Based on an earlier discussion in the previous issue, I think this logic should be hardened:
1. If a library specifies a 'remote', then it MUST specify a 'license'. (should be enhanced to also require 'version' in a separate issue)
2. If a library does not specify a 'remote' and 'license', then the default license is injected.
Doesn't appear to belong to this patch?
Please remove the custom assertion messages from all of these.
Comment #6
wim leers#4: D'oh :( Fixed.
#5:
compatibleis so vague. Let's just rename it togplv2-compatible? :)Actually, they are consistent. Whenever a specific tag is available, it points to that. Otherwise, it points to the best alternative.
That's not a new problem. People also tend to forget to update the
versionkey.Comment #7
wim leersWhat else is left here? Let's get this in!
Comment #8
wim leersReroll; this was broken by #2223143: Consolidate library extension caches into a single cache entry.
Also verified that no 3rd party libraries have been added in the mean time; so this patch should once again be good to go.
Comment #9
dawehnerYeah to unit tests!
Doesn't all the code not run if buildByExtension throws an exception?
Comment #10
wim leers#9: good catch; you're absolutely right! I think that might be a remnant from an early iteration. Removed.
Comment #11
dawehnerThank you!
Comment #12
alexpottCommitted 256b197 and pushed to 8.x. Thanks!
Comment #14
nod_Doesn't this need a change record?
Comment #15
alexpottGood point - it does. I thought we might get away with updating https://www.drupal.org/node/2201089 but I don't think so
Comment #16
pbull commentedPHPUnit tests are failing with:
Trying to @cover or @use not existing method "\Drupal\Core\Asset\LibraryDiscoveryParser::buildLibrariesByExtension".Should the annotations in core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryParserTest.php now be using
@covers ::buildByExtension()instead of@covers ::buildLibrariesByExtension()?Comment #17
mile23Here's a patch to fix the errors @pbull mentions in #16.
Fixes some @covers annotation, and also test method names to reflect the method names being tested.
There really should be a flag in the phpunit.xml.dist file to check for bad coverage annotation within continuous integration. Discussion here: #2105583: Add some sane strictness to phpunit tests to catch risky tests
Comment #18
dawehnerThese tests don't fail, unless you run them in static mode or code coverage, just to clarify.
Comment #19
alexpottOkay, committed 8d6f823 and pushed to 8.x. Thanks!
Can we get a change record now?
Comment #21
alexpottComment #22
alexpottComment #23
wim leers@Mile23: thanks for #17!
Change record published: https://www.drupal.org/node/2307387.
Comment #25
dawehnerAdd a related issue
Comment #26
yesct commentedchanging to use the more common tag, so the less common one can be deleted, so it does not show up in the auto complete and confuse people.