-
Notifications
You must be signed in to change notification settings - Fork 966
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
Generated .m file containing $$ in its name are not found in Xcode (J2objc 0.9.7) #517
Comments
I created a sample project to reproduce this issue here: https://github.com/confile/j2objc-dollarsign |
Xcode uses $ for macros, and apparently $$ for a $ constant. That's why the filename only has one $ in the error message. Try changing the names ApplicationModule$$$$ProvideSome... If that doesn't work, ask on StackOverflow where Xcode experts may help. |
@tomball The problem is that the dagger annotation processor generates these files with $$ in the middle so I cannot change them. |
It looks like you found an Xcode bug: where it can't build source files On Fri, Apr 10, 2015 at 12:08 AM Confile notifications@github.com wrote:
|
Another option you have (which would be faster than waiting for an Xcode On Fri, Apr 10, 2015 at 6:50 AM Tom Ball tball@google.com wrote:
|
@tomball I have a much simpler solution. You can simple duplicate files like this. When you have a file |
Here's an even simpler solution: use the latest Dagger 2.0 -- they recently If you have problems with sources generated by annotation processors in the On Fri, Apr 10, 2015 at 7:41 AM Confile notifications@github.com wrote:
|
@tomball Thank you tom you are brilliant. From our previous discussion I think I need your latest version of guava 18, since dagger needs at least 18. As we discussed earlier using dagger annotation processor directly with j2objc will only work after your guava update. Can you guess when this update will come? Thank you so much for your help. |
We're in the process of using jarjar https://code.google.com/p/jarjar/ to On Fri, Apr 10, 2015 at 9:06 AM Confile notifications@github.com wrote:
|
When Java files contain
$$
in there name Xcode raises an error because it searches for files containing only$
in its name, i.e., one dollar sign instead of two.I use the J2objc 0.9.7. Here is a simple example of the problem. Create two files:
and
Here are the steps to reproduce:
This will create the class files as well as
build/classes/com/example/ApplicationModule$$ProvideSomeClassXFactory.java
.2. Execute
j2objc
:this will generate the following 18 files:
3. Insert the generated files in a Xcode project and build the project with other linker flag
-ObjC -lguava -ljavax_inject -ljre_emul -ljsr305
Step 3 will generate the following error:
The correct file must contain two dollar signs instead of one. It seems that the transpiling went wrong in the case of two dollar signs in their name.
The text was updated successfully, but these errors were encountered: