-
Notifications
You must be signed in to change notification settings - Fork 218
Combine sy
and syd
script into one
#210
Comments
Plus if it is one script, it would be easier to manage different OS (un*x/osx/cygwin) |
I see two options for merging scripts: 1/ hook into grade application script and do something like
pros : nice logic 2/ or we could add syncanyd script at the end of the script and force CommandLineClient client to ignore daemon parameter before entering into 'start()' function. For windows script we could:
What do you think ? |
I don't like (2) at all. Sounds like a dirty hack to me. I'd go with (1) or at least with something similar. I see two options: Option A)
So basically use the current Option B)
Option B has the benefit that it will work on more systems, because Gradle takes care of all the weird Darwin/Cygwin stuff... If there are no objections, I think we should go with B. Would you like to implement this @vwiencek? |
Ok for me, I'll do it On Sun, Aug 31, 2014 at 11:34 PM, Philipp C. Heckel <
Vincent Wiencek |
Can you maybe make a new branch for that and merge lib/daemon in it? It's probably easier to have that in one step. Relates to #215. |
Ok some thoughts trying to figure out a way to do this. On Mon, Sep 1, 2014 at 10:55 AM, Philipp C. Heckel <notifications@github.com
Vincent Wiencek |
Okay this is getting ugly. We definitely don't want this. But afaik syncany-daemon only depends on syncany-cli because of the DaemonCommand. This would move over to syncany-cli.
|
…le.xml instead; relates to #210
Hi all you can find my proposal for daemon/lib merger && script merging As for now Vincent On Mon, Sep 1, 2014 at 4:30 PM, Philipp C. Heckel notifications@github.com
Vincent Wiencek |
Looks good so far. A few remarks:
|
Ok for all except 1, because right now syncing-messages depends on
Vincent On Mon, Sep 1, 2014 at 10:43 PM, Philipp C. Heckel <notifications@github.com
Vincent Wiencek |
Leave it like it is. I don't see a good way except to merge the messages module as well. |
You prefer to keep message / daemon / lib separated ? or merge all ? On Tue, Sep 2, 2014 at 2:09 PM, Philipp C. Heckel notifications@github.com
Vincent Wiencek |
Merged. ;-) |
ok .... best way to decouple message from lib would be to have POJO On Tue, Sep 2, 2014 at 2:44 PM, Philipp C. Heckel notifications@github.com
Vincent Wiencek |
I rewrote the Linux script a bit to make it nicer, see branch https://github.com/syncany/syncany/tree/feature/scripts Also: |
Ok I'll look at that I think the PATH stuff was there before ... 12/ok 13/ok 14/how did you realise that ... That I can try to reproduce it ! ---Sent from Boxer | http://getboxer.com On 2 septembre 2014 19:24:12 UTC+2, Philipp C. Heckel notifications@github.com wrote:I rewrote the Linux script a bit to make it nicer, see branch https://github.com/syncany/syncany/tree/feature/scripts Also: (12) Can you try to use coding guidelines and the branching model (name feature branches feature/ ). (13) Try to look at the git-compare output to see if there are unusal things, like a whitespace that you didn't expect: https://github.com/syncany/syncany/compare/feature/scripts?expand=1#diff-4d090ebb1b3b769c70ac99bc0dd5e45bR2 (14) Can you answer (9)? (15) I just realized that we now cannot run CLI commands via the REST API anymore. This is not cool. We have to find a solution for that ... —Reply to this email directly or view it on GitHub. |
The code you commented in the WatchRunner executes incoming CliRequests. To reproduce launch the daemon with one daemon-managed Syncany folder. Then navigate to that folder via the command line and run |
@ all a. Right now, if a folder is Syncany-managed, the CLI finds a b. Another possibility would be to parse the CLI params in the CLI and make useful REST commands out of the ones that actually make sense (restore, up, down, status, ..., ls). This is probably the better way to do it, but it requires a lot of extra work and manual mapping between CLI command and REST request. Any thought? (was that understandable?) @vwiencek With the exception of (15) and the windows batch script, everything is fine now. Can you combine the batch script? Or do you want me to do that? |
Code for (a): |
I'm confused because there is still a dependency issue. Indeed this method rely on Command object which is part of syncing-cli I think we should get rid of *Command objects and use instead *Operations Your proposition would be to call directly correct commands inside CLI and On Wed, Sep 3, 2014 at 8:14 AM, Philipp C. Heckel notifications@github.com
Vincent Wiencek |
Ok I got it.
what do you think ? On Wed, Sep 3, 2014 at 9:06 AM, Vincent Wiencek vwiencek@gmail.com wrote:
Vincent Wiencek |
I strongly object moving the printResults() method to the operation result -- since the operations are presentation-agnostic (meaning they don't care how results are presented to the consumer; CLI output looks different to GUI output, etc.). I'd rather create use-case specific REST requests for the operations that actually make sense. Example 1:
Example 2:
And so on ... The question is: Can we do that for all requests/operations transparently (= magically map "BlaRequest" to "BlaOperation"?! |
ok that's what I was doing ... except for the printresult :) Vincent On Wed, Sep 3, 2014 at 11:36 AM, Philipp C. Heckel <notifications@github.com
Vincent Wiencek |
Don't do too much in one branch. It makes it impossible to merge it if you keep developing in one branch. I'd leave this out of the feature/script branch and focus on the .bat file for this branch. You can base another branch on feature/script to do the CliRequest stuff. |
Chat do you mean by "combine the batch script"? Envoyé de mon iPhone
|
I'd like a combined syd.bat and sy.bat in the new sy.bat. Calling syd.bat from sy.bat is not enough. See above: "@vwiencek With the exception of (15) and the windows batch script, everything is fine now. Can you combine the batch script? Or do you want me to do that?" |
ok i'll do it tonight once I got my windows machine On Wed, Sep 3, 2014 at 11:50 AM, Philipp C. Heckel <notifications@github.com
Vincent Wiencek |
yes I'm on it On Wed, Sep 3, 2014 at 10:00 PM, Philipp C. Heckel <notifications@github.com
Vincent Wiencek |
Ah cool. Thanks! |
done FYI : if condition ( command ) else ( ) suc*s because it leads to some On Wed, Sep 3, 2014 at 10:35 PM, Philipp C. Heckel <notifications@github.com
Vincent Wiencek |
Looks very good and clean to me. See vwiencek@4adb609. I'll test it tonight with my Windows VM and if it works properly, we can merge it and close/merge the above mentioned issues. |
great On Thu, Sep 4, 2014 at 3:04 PM, Philipp C. Heckel notifications@github.com
Vincent Wiencek |
Merged in ddba59a. Now lets see how Travis reacts with the tests. Maybe I should have created a pull request first ... If Travis is happy, we'll close this (and the other issues). |
Travis was a good boy. https://travis-ci.org/syncany/syncany/builds/34412004 |
Currently Syncany has two commands: The
sy
script to control the regular CLI commands and thesyd
script to control the daemon. I don't see any reason why these two scripts shouldn't be a single scriptsy
.To realize this, I suggest using the Gradle-generated script (as per the Gradle application plugin, and the alterations we do in the build.gradle) as a basis and embed the syd script features we developed (
start
,stop
, etc.).The script would then do the following:
sy (start|stop|reload|restart|force-stop|status)
would be handled by the script itselfsy (init|connect|up|...)
(and all other commands) would be handed over to the Java implementationAny voluteers?
The text was updated successfully, but these errors were encountered: