Skip to content
This repository has been archived by the owner on Jun 23, 2020. It is now read-only.

Add support for literals with dash #22

Closed
wants to merge 1 commit into from
Closed

Add support for literals with dash #22

wants to merge 1 commit into from

Conversation

stremlenye
Copy link
Contributor

Motivation

Shading rule rename doesn't support such patterns as "com.typesafe.akka.akka-http-core.*" or "com.typesafe.akka.akka-http-core.**".
Also during substitution of String literals in such case

this.Daemonicity = this.config().getBoolean("akka.daemonic");
this.JvmExitOnFatalError = this.config().getBoolean("akka.jvm-exit-on-fatal-error");

some of them substitutes inconsistently and code starts to look like:

this.Daemonicity = this.config().getBoolean("shadeio.akka.daemonic");
this.JvmExitOnFatalError = this.config().getBoolean("akka.jvm-exit-on-fatal-error");

Solution

Add dash as a valid symbol for identifiers.

Disclaimer

I am not pretty sure in that solution (because have no experience in such low-level details) and that pull request is just conscripted to start a discussion.
Please be patient and provide your comments.
Thank you for your time.

@lucastorri
Copy link

Hi,

any chance this could be accepted. I'm also interested on it.

Thanks

@stuhood stuhood requested a review from cheister June 5, 2018 21:47
@stuhood
Copy link
Member

stuhood commented Jun 5, 2018

@cheister : Would you be able to review this?

EDIT: ... or I guess replace it, given the merge conflict.

@lucastorri
Copy link

lucastorri commented Jun 6, 2018

Let me know if I can help (I'm not sure what is your contribution process). I can at least fix the compilation issues if needed.

Thank you.

EDIT: here is a rebased version: https://github.com/lucastorri/jarjar/tree/master

@cheister
Copy link
Contributor

cheister commented Jun 6, 2018

This is a superset of the cases fixed in #34 so we should be able to remove

if (expr.startsWith("META-INF/")) {
    expr = expr.substring("META-INF/".length(), expr.length());
}

from src/main/java/org/pantsbuild/jarjar/Wildcard.java as well.

@cheister
Copy link
Contributor

cheister commented Jun 8, 2018

Opened #35 with a rebase of this change and removal of the META-INF prefix check in Wildcard.java

@cheister
Copy link
Contributor

cheister commented Jun 9, 2018

Closing because #35 was merged

@cheister cheister closed this Jun 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants