Swiper FP8 Integration Rollout
Notes Domino 9.0.1 FP8 is finally here and as far as I know (I have yet to download it) it includes the necessary changes which will allow Swiper to swipe whatever it wants, whenever it wants, which is good news for people who don’t like to have ‘Build Automatically’ turned on.
Plan of Attack for release of Swiper version 2.0.0
So, I haven’t actually downloaded FP8 yet, so I can’t say for sure that the updated version works perfectly. Here is a bit of background, I had been working with IBM team to make sure that the necessary changes would be sufficient. I received an updated version of the ‘team’ plugin and have tested my POC successfully against that updated plugin, but I haven’t tested it fully against the full new FP8 because, as previously mentioned, I haven’t downloaded it yet.
So the plan is: I am putting a pre-release of Swiper v2.0.0 up on the Swiper Github repository.
If you have updated to FP8 and would like to test the new version I would very much appreciated it!
Here are the steps to install and ugrade:
- Download Swiper v2.0.0-alpha release from Github and install to designer
- ‘Remove Swiper’ and then ‘Add Swiper’ from any projects currently using swiper
Basically, the ‘remove’ will remove the old builders that are no longer needed, then ‘add’ will re-enable the new version. - Check that it is swiping your metadata whenever you sync!
I will also upgrade my Notes over the next week and test. Once I have heard back from a few people that it is working well, then I will prepare the final release and update the OpenNTF Project page.
Bonus Feature!
I added a new feature: there is a ‘Sync’ toolbar button to perform a sync on the currently active project. Give it a try and let me know if useful.
Background of the Reason for new Integration point
If you are curious about why there was a change necessary to allow Swiper to perform more efficiently, here is a summary:
Swiper version 1 worked like this:
- Designer has a ‘Builder’ which triggers the sync process of Design Elements to Disk
- Swiper version 1 sandwiched this Builder with 2 builders of it’s own, a Pre and Post Sync builder.
- The Pre sync builder saved some info about files that might be exported
- The Post sync builder used Pre Sync builder to figure out if files were exported, if they were then it filtered them
The trouble with this, is that there is more than one way for the Sync process to be triggered. If it was triggered on ‘project open’ event or manually with the right-click menu, then the Swiper builders would not run.
IBM have now made a modification to provide a ‘SyncListener’ extension point, so that a class can be registered to listen to import / export / rename / delete events, and has the opportunity to run some code when those events fire.
This allows swiper to run whenever there is a sync operation, regardless of when it was called.
So Swiper version 2 simply listens for the events and then acts accordingly whenever they happen.
Other uses for SyncListener
I am also curious if there are other options to utilise this feature to correct DXL Import export errors. One example is to do with agent scheduling for all-day agents. A custom Scheduling metadata file could be created and used to save the agent scheduling info on export, and then configure the agent after import.
Feedback welcome
Let me know how you go, you can report bugs either on OpenNTF Swiper Project or the Github Repository Issues
Or maybe you just want to say it is all working well! It is nice to hear when people say thanks so if it is helping you please don’t be shy! I do get some nice comments from time to time and it is a great ego boost.
When I first learned of Source Control Enablement in Designer, I was excited and then disappointed.
It was clearly not a workable solution if you needed to do any sort of branching and merging, which is core to good source control.
I was determined to get it working property. The initial DORA solution, took me about 2-3 months in my spare time to problem solve, develop and prepare so it was robust enough to share with others. It was workable but still a bit too fiddly. Later I decided that it would be cleaner to have it integrated into Designer, and a further month or two of development to get it ready. It was much more robust to install, and almost perfect.
This latest version should complete the puzzle, and hopefully there will be no more major developments needed!
I cannot imagine being able to manage the projects I have been working on over the past few years if I did not have source control, so I hope that my efforts have also enable you to work collaboratively with others, and also manage your own local branches as well!
Hi Cameron,
Here’s that ego-boosting comment:
I absolutely love Swiper! (mean it too…). It’s a must-have plugin when you’re doing source control with XPage projects (which everyone should).
Just installed FP8 and 2.0-alpha. Looking forward to test the improved integration!
Thanks Mark! I’m glad to hear it is helping!
And thank you too for your wonderful open-source projects e.g. Debug Toolbar, Bootstrap4XPages
For me the refresh ODS before sync is still missing since pulling an update to your git local repository does not automatically make it appear in the ODS. I don’t want to activate auto import since I most likely need to merge the update that I just pulled with my own update.
Yes, I know this has nothing to do with Swiper 😀
Thanks for the feedback Tinus!
It is a possible that I could make a ‘refresh’ button just like the above mentioned ‘sync button’.
or even a Refresh and Sync button. What do you think?
I don’t think this would be hard for me to do.
Personally I like having auto-refresh, auto-build, auto-import auto-export all on. I treat the git repository as the undisputed source of truth.
If I am about to pull changes or switch branches, I make 100% sure that anything I have been working on is comitted or stashed.
Then I confident that even if there are any unexpected changes I can ‘discard’ any problematic files.
Please add the Refresh and Sync button, that would really make it perfect for me.
Hi Tinus, I have added these buttons to latest release, see my latest blog post for more info
Great work, Cameron!
With the new 2.0-alpha release is ‘Add Swiper’ on each project required to use Swiper? Or will Swiper just work?
Thanks Per!
Yes, Swiper needs to be enabled for each project that will be ‘swiped’
If you had previously been using swiper version 1, you should ‘remove swiper’ and then ‘add swiper’ again
Hi Per, I have now added a preference so you can ‘Enable Swiper for All’ source controlled nsfs. See my latest blog post for details
not sure if I understand it correctly: so for each NSF I have to initiate Swiper? can this be done by command since I want to use swiper in combination with headless designer.
Hi Patrick, Yes at the moment, Swiper must be ‘enabled’ for each NSF.
However, now that the new Integration point is available, I can actually included an option ‘Always Use Swiper during Sync’ so that all Source Control databases will use it by default.
In regards to Headless Designer, depending on how you are using it, Swiper may not be necessary.
In the default setup of Headless Designer, you would create a new NSF on each build. Swiper only runs on export, and Headless Designer should be an ‘import’ only. When a ‘swiped’ file is imported, Designer will decide to fill in the missing metadata, and if auto-export is selected in source control preferences it will likely bounce back down to the disk with the new metadata.
I am using Headless Designer a little differently, I have a custom plugin installed which asks like a ‘server’ listening for an instruction to synchronises an existing project instead of a new one each time. This means builds are faster because it doesn’t have to do a full build, and I can refresh designs directly from this nsf.
In this case I do have swiper enabled on each project.
In any case, I will add the preference to ‘Always use Swiper during sync’ so that you can choose to enable for every project by default.
Patrick I have added this preference to the latest release, please check the latest blog post / latest release on github repo