Refactoring Objects/Structure CLUSTER

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

Refactoring Objects/Structure CLUSTER

Postby bcusick » Tue Mar 14, 2017 3:12 pm

I'm trying to refactor a bunch of items (renaming, moving, etc) relations, media, forms, etc. so I could clean up a particular solution that was developed a while ago (that functions WONDERFULLY the way it is).

I keep running into a HUGE MESS:

A HUGE number of "duplicate UUID" errors;
After moving 30 media files from one module to another I get "duplicate forms found in scope XXX" - even though I didn't touch any forms;
Moving 8 relations from one module to another results in "duplicate relation found" errors;
Renaming 5 forms (and using find/replace to update the references) results in "duplicate scope XXXX found" errors
etc, etc.

I've tried this on 3 different machines (2 windows 10, 1 mac) - and get DIFFERENT RESULTS every single time - NONE of them working the way I would expect.

This is obviously a case of me being TOTALLY STUPID - but I was wondering if it's better to just move and reorganize things on the file system?

Or is this a case of "you're screwed"?

It's EXTREMELY frustrating. I've spent over 45 HOURS trying various combinations - all a waste of time.

I'm open to suggestions.

</rant>
Bob Cusick
bcusick
 
Posts: 1209
Joined: Wed Apr 23, 2003 11:27 pm
Location: Thousand Oaks, CA USA

Re: Refactoring Objects/Structure CLUSTER

Postby goldcougar » Wed Mar 15, 2017 9:44 pm

I've not had much success with some of those items either. Small moves are ok...sometimes.

So, sometimes I end up doing the "non-official, don't try this at home" approach, and just close Servoy developer and edit the files on the file system outside of Servoy. Do some old school search and replace. Manually move the files where they need to go, etc. Make a backup of your workspace first! When you do launch servoy, go into the Resource perspective and do a F5/Refresh.

Note: That will completely screw you if you try to import it into a app server that is already running the solution, because the UUID's parent hierarchy got changed and the repository is confused. However, if you are importing it into a fresh repository, it won't know any different.
Scott Butler
iTech Professionals, Inc.
SAN Partner

Servoy Consulting & Development
Servoy University- Free Training Videos
Servoy Guy- Free Plugins, Tips & Resources
ServoyForge- Open Source Servoy Components
User avatar
goldcougar
Servoy Expert
 
Posts: 662
Joined: Sun Jan 08, 2006 7:15 am
Location: Cincinnati, OH

Re: Refactoring Objects/Structure CLUSTER

Postby Andrei Costescu » Thu Mar 16, 2017 9:17 am

As I doubt that it's "a case of" you "being TOTALLY STUPID" :) we should get to the bottom of this. What version of Servoy Developer do you use?
If you use Solution Explorer context menu items to rename/move it should work fine, if the target location doesn't have those already. (actually it should work fine even then, maybe ask you to overwrite, although I didn't try it)

So I would say that if you can easily reproduce these in a small solution you should create a case so that they get fixed.
If you can only reproduce it in your solution then creating a case would be nice but we will need to try it out on your solution...

About moving underlying solution files outside of developer + refresh or in developer but from navigator/project explorer views for example - you should be really careful to keep a valid structure. And yes, what Scott says is very important - do not reuse then on the application server a repository that already has that solution. It will either error out during import or potentially have unwanted side effects.
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 939
Joined: Tue Jun 26, 2007 3:14 pm

Re: Refactoring Objects/Structure CLUSTER

Postby bcusick » Thu Mar 16, 2017 3:18 pm

@Scott - thank you. My gosh - if YOU can't reliably do it - then at least I don't feel like a TOTAL idiot. :roll:

@Andrei - It's a REAL problem. Really. Take any solution with 3 or 4 or 5 modules, and move relations and forms and see what happens. TIP: It will be TOTALLY screwed. Really. To the point that if you didn't back it up or use SVN, you would NEVER be able to fix it. Really. Try it.

Thanks for your replies guys - I appreciate all your effort and time.
Bob Cusick
bcusick
 
Posts: 1209
Joined: Wed Apr 23, 2003 11:27 pm
Location: Thousand Oaks, CA USA

Re: Refactoring Objects/Structure CLUSTER

Postby Andrei Costescu » Thu Mar 16, 2017 4:09 pm

Created SVY-10951.
You can watch that case or add any additional info to it.
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 939
Joined: Tue Jun 26, 2007 3:14 pm

Re: Refactoring Objects/Structure CLUSTER

Postby lvostinar » Thu Apr 19, 2018 1:11 pm

I investigated this issue in Servoy 8.3 but seems to work well for me. I tried to move relations and forms in between solution and its modules (30+ modules). Please attach a zipped workspace to the issue if it still happens in Servoy 8.3 .
Laurian Vostinar
Servoy
lvostinar
 
Posts: 1049
Joined: Tue Feb 19, 2008 10:53 am


Return to Programming with Servoy

Who is online

Users browsing this forum: No registered users and 4 guests

cron