Rails
Rails copied to clipboard
Unify the "root"-package names
Currently there are two packages at the root level:
net/sf/railsrails/game
These two packages should be merged into a single package, which is the root of the Rails project.
That has been tried by Stefan Frey and he was unable to do so at that time.
This has something to do with the actions that reside below rails.game.action.
Dont ask me why and how. But if you can manage to do so without breaking anything, you are more than welcome :)
Am 12.07.17 um 23:12 schrieb madoar:
Currently there are two packages at the root level:
- |net/sf/rails|
- |rails/game|
These two packages should be merged into a single package, which is the root of the Rails project.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Rails-18xx/Rails/issues/18, or mute the thread https://github.com/notifications/unsubscribe-auth/AGcIyXCZ5na-2DLDSyDbJhxZZKtsxpbMks5sNTa3gaJpZM4OWNfE.
Hmm. It seems like the tests fail after merging the two repositories.
The problem here is, that the tests are quite silent in telling me what exactly failed.
It seems like everything we're printing via the log object isn't shown in the console, regardless of the message type.
Do you know why this is the case?
Regarding the main problem why the tests fail:
It seems like this is caused by the "old" save games located in src/test/resources/data/*/*.rails.
These files look like serialized java objects to me, and seem to contain the old package names.
This leads to the JRE being unable to find the correct classes and therefore throwing and exception.
Is there a way to regenerate the .rails files?
You would have to replay all the games to the state in the save game. The TestGameBuilder Class just regenerates the reports from the .rails by replaying the actions. Then the test mechanismn can compare the output of a test to the .reports.
And yes the save games are serialized objects. Stefan has somewhere (i think in the wiki) mentioned that by his opinion we should void the serialization and go for json/XML type Savegames. Which of course might open up modifications in PBEM that require some sort of checksum mechanismn imho.
But we can and should discuss this with Erik and Brett and others in Slack.
Am 13.07.17 um 13:15 schrieb madoar:
Regarding the main problem why the tests fail: It seems like this is caused by the "old" save games located in |src/test/resources/data//.rails|. These files look like serialized java objects to me, and seem to contain the old package names. This leads to the JRE being unable to find the correct classes and therefore throwing and exception. Is there a way to regenerate the |.rails| files?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Rails-18xx/Rails/issues/18#issuecomment-315048612, or mute the thread https://github.com/notifications/unsubscribe-auth/AGcIyRVl9H4RDeAdBnqbp8MXV8UrvBYKks5sNfxKgaJpZM4OWNfE.
Yet another reason to go back to the original package name structure.
HI Erik,
i do agree that the orginal Structure has that advantage yes. And since we should not be dependant on the development platform i would concur with your statement. I think Stefan wanted to follow some unwritten convention there. If someone is able to rewrite that automatically i am all for going with the old rails. als root.
Am 13.07.17 um 13:54 schrieb erik-vos:
Yet another reason to go back to the original package name structure.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Rails-18xx/Rails/issues/18#issuecomment-315056281, or mute the thread https://github.com/notifications/unsubscribe-auth/AGcIyT0RMEWZbCpsVxeWA8Kls8sBf-4pks5sNgVfgaJpZM4OWNfE.
@erik-vos I'm not sure I see the benefit of the old structure?
The old structure looks like someone forgot to add a net.sf in front of the second package rails.game.
Especially because the first package net.sf.rails contains a game package too, whose content fits quite well to the content of the root rails.game package.
Back to the current state of my experiments: Until we have found a solution to make the tests work together with a new package structure, I don't plan to introduce a new package structure.
The old structure was without the (IMHO) redundant prefix net.sf. for all classes. Removing that completely should not be a big deal with eclipse.