It is currently 26 Apr 2024, 09:59
   
Text Size

Forge version 1.5.34

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Re: Forge version 1.5.34

Postby Max mtg » 28 Jan 2015, 13:40

Agetian wrote:I committed an experimental tweak in r28735 that corrects the draft order for older sets (pre-Mirrodin Besieged) in Quest Draft Tournaments (cut)

I hope I understood it correctly and it seems to work fine in my tests, but please review and feel free to update if necessary (in case I misunderstood something, for instance).

- Agetian
I wonder why is everyone so tolerant to copy-pastes?

r28734:
Code: Select all
if (set.getDate().before(MBSDate))
      isBeforeMBS = true;
why not to just reverse-sort the CardEdition[] sets array here?
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

Re: Forge version 1.5.34

Postby Agetian » 28 Jan 2015, 15:10

About copy-pastes - not sure what exactly you're referring to, but I think people are tolerant because not everybody is a pain in the assneck, but anyways, that's beside the point... :)

Max mtg wrote:why not to just reverse-sort the CardEdition[] sets array here?
It looks like just reverse-sorting it is not going to cut it (I tried when I first began to implement this and ended up not going for it because some of the draft combination cases worked not as expected: if you just reverse-sort the array, then pushing sets[0]/sets[1]/sets[1] in the inverted order (essentially sets[1]/sets[0]/sets[0]) is not the same as the expected sets[1]/sets[1]/sets[0], and similar to that there are other cases which differ somewhat more substantially than just the sort order. In practice for a two-set block you get e.g. Eventide/Shadowmoor/Shadowmoor on a reverse sorted array instead of the expected Shadowmoor/Shadowmoor/Eventide. A similar but worse issue happens with a 3-set block, where you get the wrong set on a triple draft (e.g. triple Ice Age will show Coldsnap/Coldsnap/Coldsnap instead of the expected Ice Age/Ice Age/Ice Age because sets[2] will be Coldsnap instead of Ice Age when the array of sets is reverse-sorted). Maybe I do misunderstand the math though, or maybe you meant some other form of sorting, like I said, so if you feel you know how to make it look better while making sure it functions the same, be my guest to take a whack at it, you were always pretty good at clean code (something, as you know and can see, I'm still not exactly good at ;) ). Or just tell me more specifically what a better option might be, I can try to fix my implementation accordingly - I may not be a clean coder yet but I'm trying to improve with every opportunity :)

- Agetian
Last edited by Agetian on 28 Jan 2015, 16:24, edited 1 time in total.
Agetian
Programmer
 
Posts: 3472
Joined: 14 Mar 2011, 05:58
Has thanked: 677 times
Been thanked: 561 times

Re: Forge version 1.5.34

Postby Agetian » 29 Jan 2015, 16:59

r28745: I committed an experimental fix for unplayable abilities of cards returning to hand (e.g. Genju of the Fields returning from graveyard, split cards canceled at mana payment, etc.). It utilizes recreation of cards using the standard copyCard mechanism used when a card leaves the battlefield. I tested interaction of this fix with various ETB/LTB triggers and effects, including the ones that fire when a card is to return to hand, and they seem to work fine, but if you have any concerns about this functionality or if it proves to break something please let me know - however, I don't have another fix at the moment, so I'll simply have to revert the fix in that case.

Please note that this does not fix Uba Mask not allowing to play a card from the exile again if it was canceled once and potential other similar issues (see the discussion at the Developing Bugs thread that begins here: viewtopic.php?f=52&t=5035&start=390#p172200) - I don't know how to fix that at the moment, if you have a good enough idea for a fix, feel free to experiment.

- Agetian
Agetian
Programmer
 
Posts: 3472
Joined: 14 Mar 2011, 05:58
Has thanked: 677 times
Been thanked: 561 times

Re: Forge version 1.5.34

Postby Chris H. » 29 Jan 2015, 17:49

I might have repaired my broken dev system.

It looks like I did not have the JavaHL library installed and Eclipse was using a SVNKit instead. I followed the instructions that I found on a web site and was able to get JavaHL installed. I then had to run a svn upgrade command and the dev system broke completely.

So I have reinstalled Eclipse and the workspace several times and it looks like I now have a functional dev system. I just built and deployed to cardforge a new snapshot.

I guess that I should try a beta build and deploy as a test tomorrow.
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: Forge version 1.5.34

Postby Agetian » 29 Jan 2015, 17:57

Chris H. wrote:I guess that I should try a beta build and deploy as a test tomorrow.
That's very good to hear! I think we're relatively stable at the moment, too (albeit opinions on the latter are welcome, of course).

- Agetian
Agetian
Programmer
 
Posts: 3472
Joined: 14 Mar 2011, 05:58
Has thanked: 677 times
Been thanked: 561 times

Re: Forge version 1.5.34

Postby elcnesh » 29 Jan 2015, 18:56

Just curious, can you provide a link to how you installed JavaHL? I haven't managed so far...
elcnesh
 
Posts: 290
Joined: 16 May 2014, 15:11
Location: Netherlands
Has thanked: 34 times
Been thanked: 92 times

Re: Forge version 1.5.34

Postby Chris H. » 29 Jan 2015, 21:49

elcnesh wrote:Just curious, can you provide a link to how you installed JavaHL? I haven't managed so far...
 
The following site gives some info on Subclipse and SVN/JavaHL version.

http://subclipse.tigris.org/wiki/JavaHL#head-5bf26515097c3231c1b04dfdb22c036bc511926b

This site has instructions for all major OS releases, Windows, OS X and Linux. For OS X you have to install MacPorts or HomeBrew and then run a terminal command. I chose to use http://mxcl.github.com/homebrew/
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: Forge version 1.5.34

Postby Max mtg » 30 Jan 2015, 05:28

Agetian wrote:About copy-pastes - not sure what exactly you're referring to, but I think people are tolerant because not everybody is a pain in the assneck, but anyways, that's beside the point... :)
As a worst pain in the ass, I've refactored that part (that resulted in over 20 lines less), please review.
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

Re: Forge version 1.5.34

Postby Agetian » 30 Jan 2015, 05:38

Max mtg wrote:
Agetian wrote:About copy-pastes - not sure what exactly you're referring to, but I think people are tolerant because not everybody is a pain in the assneck, but anyways, that's beside the point... :)
As a worst pain in the ass, I've refactored that part (that resulted in over 20 lines less), please review.
Thanks for help! I tried it and it works fine in most cases but not in all cases - like I mentioned in my previous post before, it doesn't work well with the triple drafts from older sets. E.g. try starting a quest with custom format, define the Ice Age block and wait for it to generate the triple Ice Age tournament. It shows up as "CSP/CSP/CSP" instead of as "ICE/ICE/ICE", which is definitely wrong.

EDIT: It looks like it's also true of the newer sets too in this implementation (triple Theros shows up as JOU/JOU/JOU instead of THS/THS/THS, so maybe it's just necessary to replace s2c with s0c for triple drafts?)

EDIT 2: Looks like that was it, I committed a fix. Now seems to work correctly in all cases. Thanks again, your solution is really neat! :)

- Agetian
Agetian
Programmer
 
Posts: 3472
Joined: 14 Mar 2011, 05:58
Has thanked: 677 times
Been thanked: 561 times

Re: Forge version 1.5.34

Postby Chris H. » 30 Jan 2015, 13:57

My attempt to do a beta build and deploy today ended in another build failure. There appears to have been a problem checking in the modified pom files. The error messages that I am getting are somewhat different from the errors that I got the last time I tried a beta build and deploy.
 
Code: Select all
[INFO] [INFO] Reactor Summary:
[INFO] [INFO]
[INFO] [INFO] Forge Parent ....................................... SUCCESS [  0.063 s]
[INFO] [INFO] Forge Core ......................................... SUCCESS [  2.577 s]
[INFO] [INFO] Forge Game ......................................... SUCCESS [  2.930 s]
[INFO] [INFO] Forge AI ........................................... SUCCESS [  0.853 s]
[INFO] [INFO] Forge Net .......................................... SUCCESS [  0.113 s]
[INFO] [INFO] Forge Gui .......................................... SUCCESS [  1.317 s]
[INFO] [INFO] Forge .............................................. SUCCESS [01:24 min]
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] BUILD SUCCESS
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Total time: 01:32 min
[INFO] [INFO] Finished at: 2015-01-30T08:44:46-05:00
[INFO] [INFO] Final Memory: 34M/199M
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] Checking in modified POMs...
[INFO] Executing: /bin/sh -c cd /Users/me/Documents/workspace/forge && svn --non-interactive commit --file /var/folders/18/gb84vnwh8xschl006s6pn2b80000gn/T/maven-scm-2040177737.commit --targets /var/folders/18/gb84vnwh8xschl006s6pn2b80000gn/T/maven-scm-3895767802268339046-targets
[INFO] Working directory: /Users/me/Documents/workspace/forge
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Forge Parent ....................................... FAILURE [01:36 min]
[INFO] Forge Core ......................................... SUCCESS [  3.137 s]
[INFO] Forge Game ......................................... SUCCESS [  3.243 s]
[INFO] Forge AI ........................................... SUCCESS [  1.251 s]
[INFO] Forge Net .......................................... SUCCESS [  0.180 s]
[INFO] Forge Gui .......................................... SUCCESS [  1.609 s]
[INFO] Forge .............................................. SUCCESS [01:34 min]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 03:23 min
[INFO] Finished at: 2015-01-30T08:44:48-05:00
[INFO] Final Memory: 42M/208M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5:prepare (default-cli) on project forge: Unable to commit files
[ERROR] Provider message:
[ERROR] The svn command failed.
[ERROR] Command output:
[ERROR] svn: E215004: Authentication failed and interactive prompting is disabled; see the --force-interactive option
[ERROR] svn: E215004: Commit failed (details follow):
[ERROR] svn: E215004: No more credentials or we tried too many times.
[ERROR] Authentication failed
[ERROR] svn: E120191: Additional errors:
[ERROR] svn: E120191: Error running context: The requested authentication type(s) are not supported
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
logout

[Process completed]

User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: Forge version 1.5.34

Postby timmermac » 30 Jan 2015, 18:55

Chris, that error makes me think there is something username or password related going on.
"I just woke up, haven't had coffee, let alone a pee in 7 days, and I find out you stole my ass and made a ...mini-me! Carter, I should be irked currently, yes?" - Jack O'Neill
User avatar
timmermac
Tester
 
Posts: 1512
Joined: 17 May 2010, 20:36
Has thanked: 18 times
Been thanked: 95 times

Re: Forge version 1.5.34

Postby Chris H. » 30 Jan 2015, 22:47

timmermac wrote:Chris, that error makes me think there is something username or password related going on.
 
Yep, I agree. I can not think of a way to fix this. :(

I have a settings.xml file which contains the username and password combo for use with the cardforge site. The settings.xml file on my new computer and the older one had only the username and password combo for use with the cardforge site.

The older computer had the username and password combo for use with the slightlymagic repo site located elsewhere on the older computer.

And I can not remember how/where Dave had me enter this username and password combo for use with the slightlymagic repo site.
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: Forge version 1.5.34

Postby Chris H. » 30 Jan 2015, 23:35

I am now trying to add the missing credentials and I accidentally merged in the changed pom files. The pom files were changed earlier today when I had the beta build failure and we need to go back to the earlier snapshot version number for me to continue. :(

Can someone revert the pom files for me?

Or rev 28752 in its entirety could be reverted back to rev 28751. This might be the best way to the point where I can try the beta build and deploy once more tonight.
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: Forge version 1.5.34

Postby Agetian » 31 Jan 2015, 05:22

I reverted r28752, Chris, so you can try again. Thanks! :)

- Agetian
Agetian
Programmer
 
Posts: 3472
Joined: 14 Mar 2011, 05:58
Has thanked: 677 times
Been thanked: 561 times

Re: Forge version 1.5.34

Postby Chris H. » 31 Jan 2015, 15:12

Agetian wrote:I reverted r28752, Chris, so you can try again. Thanks! :)

- Agetian
 
Thank you very much for the revert. :)

This time the poms were checked in OK and no error reported at the time. My efforts to add in the missing credentials must have worked.
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 120 guests


Who is online

In total there are 120 users online :: 0 registered, 0 hidden and 120 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 120 guests

Login Form