Skip to content

Conversation

DreierF
Copy link
Contributor

@DreierF DreierF commented Jan 3, 2022

Found this while debugging to understand how the plugin actually works. The endsWith extension function does not what it seems to do at first sight

/**
 * Determines whether this file belongs to the same root as [other]
 * and ends with all components of [other] in the same order.
 * So if [other] has N components, last N components of `this` must be the same as in [other].
 * For relative [other], `this` can belong to any root.
 *
 * @return `true` if this path ends with [other] path, `false` otherwise.
 */
public fun File.endsWith(other: String): Boolean = endsWith(File(other))

and therefore always evaluates to false

@DreierF DreierF force-pushed the manifest_check_skipped branch from 4ee95e9 to d400938 Compare January 3, 2022 18:19
)
.addFunction(
FunSpec.builder("fromUri")
.addParameter("uri", String::class)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be URI:class for consistency. I'm not sure yet.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't really judge what implications that would have

Comment on lines -487 to +492
if (!file.endsWith(".jar")) {
if (file.extension != "jar") {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nice catch. It might be worth filing an IDEA ticket to https://youtrack.jetbrains.com

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DreierF DreierF requested a review from vlsi January 4, 2022 15:56
Previuosly, Bundle-License attribute was unexpectedly ignored
@vlsi vlsi force-pushed the manifest_check_skipped branch from b5ca400 to 6757ea8 Compare January 4, 2022 18:25
@vlsi vlsi force-pushed the manifest_check_skipped branch from 6757ea8 to 1620e01 Compare January 4, 2022 18:29
@vlsi vlsi merged commit 1620e01 into vlsi:master Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants