Bug: J2S compiler not activated on Linux/macOS (Wrong ".J2S" file name)#54
Merged
Merged
Conversation
Cause
=====
In Java2ScriptCompiler the literals ".J2S" and ".j2s" are used as names
for the J2S compiler options file (the "dot-j2s" file). The literals
only differ in the case of the letters.
On Windows both literals ".J2S" and ".j2s" denote the same file. However
on other operating systems (like Linux and macOS) the two literals (can)
identify two different files. This is because these operating
system have (or can have) case-sensitive file systems.
As a consequence adding a file ".j2s" (with lower case letters) to a
project will not activate the J2S compiler on Linux and macOS because
the compiler's "isActive" method checks for the file ".J2S" (with upper
case letters) and does not find such a file.
Solution
========
Always use one unique name for the J2S compiler options file (".j2s"),
accessible through constant `Java2ScriptCompiler.J2S_OPTIONS_FILE_NAME`.
Also
====
- fix "unused import" warnings in Java2ScriptCompiler.java
Collaborator
|
merged, along with change in yadav1. BobHanson/java2script:[master,yadav1], java2script/java2script:master should be synchronized. |
BobHanson
added a commit
that referenced
this pull request
Aug 20, 2018
hansonr hansonr $width should be width d59d845 hansonr hansonr unnecessary java.lang. removed b806140 hansonr hansonr // BH 8/19/2017 3.2.2.04 fixes Enum .name being .$name c333bc7 hansonr hansonr extraneous java.lang.; upgrade of JSSAXParser and SAXParserFactory de539d2 hansonr hansonr // BH 8/19/2018 -- refactored to simplify $finals$
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cause
In Java2ScriptCompiler the literals ".J2S" and ".j2s" are used as names
for the J2S compiler options file (the "dot-j2s" file). The literals
only differ in the case of the letters.
On Windows both literals ".J2S" and ".j2s" denote the same file. However
on other operating systems (like Linux and macOS) the two literals (can)
identify two different files. This is because these operating
system have (or can have) case-sensitive file systems.
As a consequence adding a file ".j2s" (with lower case letters) to a
project will not activate the J2S compiler on Linux and macOS because
the compiler's "isActive" method checks for the file ".J2S" (with upper
case letters) and does not find such a file.
Solution
Always use one unique name for the J2S compiler options file (".j2s"),
accessible through constant
Java2ScriptCompiler.J2S_OPTIONS_FILE_NAME.Also