Changes due to the recent refactoring of the package structure

17 views
Skip to first unread message

Tobias Bouschen

unread,
Mar 1, 2019, 1:10:31 PM3/1/19
to saros...@googlegroups.com
Hi all,

Today, the PR https://github.com/saros-project/saros/pull/385 was merged
onto the master. This PR contained a large scale refactoring of the
directory/package structure of the project. Switching to the refactored
state might cause some problems with your local development setup.
Furthermore, you will have to rebase all your ongoing PRs on the new
master and will most likely have to deal with some merge conflicts.

This mail describes some necessary steps due to the refactoring and
gives some tips on handling the rebasing.

If you still have any problems due to the refactoring, feel free to ask
here on the mailing list or on the gitter channel
(https://gitter.im/saros-project/saros).


*Config file incompatibilities*

This refactoring caused an incompatibility with old Saros config files,
meaning you will have to delete your local Saros config to keep testing.
This will delete any stored xmpp accounts and saros settings.

- For your local system, the Saros config is located in your home
directory in the folder '.saros/.'

- For your Eclipse build environment, the Saros config files are
contained in the different runner workspaces. For each runconfig, a
separate workspace dir will be created named 'workspace-RUNNER-stf'
where RUNNER is the account name (alice, bob, etc.). These workspaces
contain a file '.saros_stf_accounts', which you will have to delete. If
you still have problems after that, I would suggest to delete the whole
workspace.

- For your IntelliJ build environment, you don't have to do anything as
it uses the local Saros config located in the user directory.


*Problems with IntelliJ*

Due to this refactoring, you might experience problems with IntelliJ
when switching from an earlier version of the repository to a version
after the refactoring. These problems can be solved by following these
steps:
1. Invalidate the IntelliJ cache ('Files'>'Invalidate
Caches/Restart...'>'Invalidate') and close IntelliJ
2. Delete the '.idea/Modules.xml' and '.idea/modules/' if they exist.
3. Reset any changes displayed by git. After this, git should have a
clean working tree.
4. Start IntelliJ and wait until the Index is build.
5. Refresh the gradle project

If you want to reduce the time this procedure takes, you can also try to
skip invalidating the IntelliJ cache. This might work as well.


*Tips for merge conflicts due to the refactoring*

For me, git complained that it could not perform a rename detection
during the rebase as there were to many renamed files:

warning: inexact rename detection was skipped due to too many files.
warning: you may want to set your merge.renamelimit variable to at least
1921 and retry the command.

Setting 'merge.renamelimit' to 2000 allowed for relatively easy
rebasing. It still requires a lot of user interaction, but almost all
merge conflicts are located in the import section of the file. You will
have to remove the old imports and re-add the imports added by the
commit you are rebasing.

You should be careful when rebasing a commit that
creates/moves/renames/deletes a file as this is not handled
automatically by git.


Best regards,
Tobias
Reply all
Reply to author
Forward
0 new messages