-
Notifications
You must be signed in to change notification settings - Fork 31
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
'sbt compile' doesn't build anything #8
Comments
If you do |
Hi Ben, sorry for the delay in replying.
I do still get a failure trying to compile:
SBT doesn't call out the exact problem, but it seems to be line 314 of
The happy news is, when I remove that method from XeroClient, I can now build the app, create an instance of XeroClient, and list some invoices from the demo app! In general, I like the minimalist technology decisions in c.c.xc. Thanks for sharing it. |
Hello, I'm hitting the same problem. sbt compile won't go through. MacBook-Soufian:client soufian$ sbt compile [ERROR](related to above error) the first definition appears here [ERROR] 'CreditNote' is already defined [ERROR](related to above error) the first definition appears here [ERROR] 'ArrayOfCreditNote' is already defined [ERROR](related to above error) the first definition appears here [ERROR] 'Allocation' is already defined [ERROR](related to above error) the first definition appears here [ERROR] 'ArrayOfAllocation' is already defined [ERROR](related to above error) the first definition appears here [ERROR] 'TrackingCategories' is already defined [ERROR](related to above error) the first definition appears here [ERROR] 'TrackingCategory' is already defined [ERROR](related to above error) the first definition appears here [ERROR] 'ArrayOfTrackingCategory' is already defined [ERROR](related to above error) the first definition appears here [ERROR] 'Payments' is already defined [ERROR](related to above error) the first definition appears here [ERROR] 'Payment' is already defined [ERROR](related to above error) the first definition appears here [ERROR] 'Payment' is already defined [ERROR](related to above error) the first definition appears here [ERROR] 'ArrayOfPayment' is already defined [ERROR](related to above error) the first definition appears here Echec de lanalyse dun schéma. |
@tonyjayfunk that's because XeroAPI-Schemas introduced a dumb change where they removed perfectly good |
@dtbullock can you link to the commit on their side that broke things? |
@benmccann I couldn't identify a single commit which did all the damage - it's more of a mindset thing which has crept in through a series of commits. If you fetch (but not checkout) their latest stuff and run the history GUI over it, you'll see a messy tangle in recent times which makes it difficult to isolate. The disease seems to have started around '4cf8b534c88e0af01f94380dcdc0a46a53433961 (Removed credit note circular deps)' and 'c43766c497c2d42560a147fde485c500d5fcefa3 (Moved payments into the file)'. In my dev environment I've just been fixing up the damage as reported by xjc and putting the xs:include/ 's back. I've had to touch Contact.xsd, CreditNote.xsd, Invoice.xsd, and LineItem.xsd. |
I pushed my manual fixes to Note that I still have to comment out what are now lines 323-235 of XeroClient.java:
... because It's especially annoying since sbt is unhelpfully brief and says merely 'javac returned nonzero exit code' (and I can't work out how to coax it to be more specific ... would be happy to hear of solutions). I have a of contributions to make (including support for attachments), but don't feel comfortable doing it when I can't actually compile the same XeroClient.java which everyone else seems to have no trouble with. I suspect it may well come down to 'xero-java-client is only known to work with XeroAPI-Schema version X'. |
Yeah, if you look at last date xero-java-client was published in Maven you can sync to XeroAPI-Schema of same date and build |
OK, I have the world making sense. Using XeroAPI-Schema commit caa5a6a081f895f90290798767008b85c39bd247 (the last commit pulled from Ben McCann, even though it appears to have been pulled in December 2015, instead of April 2015), I can successfully build xero-java-client as of commit 3771ddc (tagged 'rel0.13') without any errors. The problem with receipts was added immediately after xero-java-client rel0.13, in commit 3771ddc where Richard Hensman added the method which I can't get to compile. That would be because XeroAPI-Schema still hasn't merged his pull request. OK, I can work with this. |
Thanks. I'm going to leave this open for others that have the problem. Do you think there's a way XeroAPI-Schema can be restructured such that it doesn't have duplicate declarations or circular references? That would make everyone happy |
Well, first I'm going to have to see what the Microsoft tooling does with the circular references, what problems duplicate declarations is actually attempting to solve, and if they can be solved another way. If Microsoft defeat me, I would lean towards an XSLT script which transformed the good circular-references versions into one big file, for consumption by the lacklustre tooling. It adds a step, but retains maintainability. As a desperate hack, I would probably lump all the things which mutually depend on each other into the same sorry .xsd file, but it might end up being pretty big - there seems to be a tangle of 3 and a tangle of 2. But that seems pretty desperate. |
I address the circular reference question here: XeroAPI/XeroAPI-Schemas#32 |
@dtbullock would you be able to try try |
Do it from the root directory of the checked-out sources, and it does nothing.
Do it from each sub-project with their own build.sbt files and:
a) 'xjc-plugin' builds ok
b) 'client' fails with:
The text was updated successfully, but these errors were encountered: