Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows: error CNDL0014 $number is not a legal identifier #946

Closed
eed3si9n opened this issue Mar 11, 2017 · 2 comments
Closed

Windows: error CNDL0014 $number is not a legal identifier #946

eed3si9n opened this issue Mar 11, 2017 · 2 comments

Comments

@eed3si9n
Copy link
Member

steps

clone sbt/sbt-launcher-package

> windows:packageBin

problem

[info] C:\xxx\sbt-launcher-package\target\windows\sbt-launcher-packaging.wix(4378) : error CNDL0014 : The ComponentRef/@Id attribute's value, '48dd0744422128446aee9ac31aa356ee203cc9f4_jars_ivy_jar_sha1190649008', is not a legal identifier.  Identifiers may contain ASCII characters A-Z,
a-z, digits, underscores (_), or periods (.).  Every identifier must begin with either a letter or an underscore.

expectations

No error.

notes

cleanStringForId might have to prefix with underscore when the ID starts with a number.

def cleanStringForId(n: String) =
n.replaceAll("[^0-9a-zA-Z_]", "_").takeRight(60) + (math.abs(n.hashCode).toString + "xxxxxxxxx").substring(0, 9)

@muuki88
Copy link
Contributor

muuki88 commented Mar 12, 2017

Hi @eed3si9n

Thanks for your bug report.

Do you have a test case where I can reproduce this? ATM I'm testing against the
appveyor test system, so I would open a PR with this test case and then I can fix it.

cheers,
Muki

@eed3si9n
Copy link
Member Author

eed3si9n commented Apr 7, 2017

Clone https://github.com/sbt/sbt-launcher-package/tree/v0.13.14, and run

$ sbt windows:publish

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants