Re: [Sugar-devel] Fedora repository with snapshots from git
thanks aklis! 2014/1/9 Code Raguet irag...@activitycentral.com On Wed, Jan 8, 2014 at 10:49 PM, Daniel Narvaez dwnarv...@gmail.comwrote: * I still need to improve the queue to skip builds when we have more recent commits. That will probably happen because the ARM slave is super slow. * I want to find a better machine to run the ARM builds, they take something like an hour for each rpm now (!). First I will try to ask the copr developers if they are planning to setup an ARM slave any time soon. If not I wonder if someone would be able to provide a XO or other ARM device running on a somewhat stable internet connection. That should be a lot faster than qemu. I've asked AC for an online XO... @aklis offered an online XO from his home and a buildbot-slave with qemu. [?] ...thanks, aklis! so, we can speed this up. ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Roger Activity Central http://activitycentral.com/ 328.png___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] sucrose-0.100 fails
green my favorite color 2014/1/7 Daniel Narvaez dwnarv...@gmail.com Hello, thanks for reporting this. Buildbot currently needs to be updated when we make changes to modules.json. We should probably fetch the changes dynamically, but I'm not sure it's worth the effort right now (changes to modules.json are pretty rare). I updated now and will restart buildbot when the current builds are done. That should fix it. On 7 January 2014 18:33, Rogelio Mita rogeliom...@activitycentral.comwrote: I don't understand why sucrose-0.100 is pulling the master branch of sugar-web. /build/modules.jsonhttps://github.com/sugarlabs/sugar-build/blob/sucrose-0.100/build/modules.json#L117 has set sucrose-0.100 branch for sugar-web. pull loghttp://buildbot.sugarlabs.org/builders/quick-sucrose-0.100/builds/143/steps/shell/logs/log : INFO:root:Running command git remote set-url origin git://github.com/sugarlabs/sugar-web.git INFO:root:Running: git remote set-url origin git://github.com/sugarlabs/sugar-web.git INFO:root:Running command git fetch INFO:root:Running: git fetch INFO:root:From git://github.com/sugarlabs/sugar-web INFO:root: 0c0d809..e46a2c6 master - origin/masterINFO:root:Running command git checkout 139a0c161288f7652ce419d236e7bc4f45a7a2bc INFO:root:Running: git checkout 139a0c161288f7652ce419d236e7bc4f45a7a2bc INFO:root:Note: checking out '139a0c161288f7652ce419d236e7bc4f45a7a2bc'. INFO:root: INFO:root:You are in 'detached HEAD' state. You can look around, make experimental INFO:root:changes and commit them, and you can discard any commits you make in this INFO:root:state without impacting any branches by performing another checkout. INFO:root: INFO:root:If you want to create a new branch to retain commits you create, you may INFO:root:do so (now or later) by using -b with the checkout command again. Example: INFO:root: INFO:root: git checkout -b new_branch_name INFO:root: INFO:root:HEAD is now at 139a0c1... Moving datastore functional tests to separate file INFO:root:sugar-web HEAD: 139a0c161288f7652ce419d236e7bc4f45a7a2bc looks that HEAD had been with the master branch files? -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Daniel Narvaez -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] sucrose-0.100 fails
sorry, this is correct pull log (build #142): http://buildbot.sugarlabs.org/builders/quick-sucrose-0.100/builds/142 2014/1/7 Rogelio Mita rogeliom...@activitycentral.com I don't understand why sucrose-0.100 is pulling the master branch of sugar-web. /build/modules.jsonhttps://github.com/sugarlabs/sugar-build/blob/sucrose-0.100/build/modules.json#L117 has set sucrose-0.100 branch for sugar-web. pull loghttp://buildbot.sugarlabs.org/builders/quick-sucrose-0.100/builds/143/steps/shell/logs/log : INFO:root:Running command git remote set-url origin git://github.com/sugarlabs/sugar-web.git INFO:root:Running: git remote set-url origin git://github.com/sugarlabs/sugar-web.git INFO:root:Running command git fetch INFO:root:Running: git fetch INFO:root:From git://github.com/sugarlabs/sugar-web INFO:root: 0c0d809..e46a2c6 master - origin/masterINFO:root:Running command git checkout 139a0c161288f7652ce419d236e7bc4f45a7a2bc INFO:root:Running: git checkout 139a0c161288f7652ce419d236e7bc4f45a7a2bc INFO:root:Note: checking out '139a0c161288f7652ce419d236e7bc4f45a7a2bc'. INFO:root: INFO:root:You are in 'detached HEAD' state. You can look around, make experimental INFO:root:changes and commit them, and you can discard any commits you make in this INFO:root:state without impacting any branches by performing another checkout. INFO:root: INFO:root:If you want to create a new branch to retain commits you create, you may INFO:root:do so (now or later) by using -b with the checkout command again. Example: INFO:root: INFO:root: git checkout -b new_branch_name INFO:root: INFO:root:HEAD is now at 139a0c1... Moving datastore functional tests to separate file INFO:root:sugar-web HEAD: 139a0c161288f7652ce419d236e7bc4f45a7a2bc looks that HEAD had been with the master branch files? -- Roger Activity Central http://activitycentral.com/ -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] sucrose-0.100 fails
I don't understand why sucrose-0.100 is pulling the master branch of sugar-web. /build/modules.jsonhttps://github.com/sugarlabs/sugar-build/blob/sucrose-0.100/build/modules.json#L117 has set sucrose-0.100 branch for sugar-web. pull loghttp://buildbot.sugarlabs.org/builders/quick-sucrose-0.100/builds/143/steps/shell/logs/log : INFO:root:Running command git remote set-url origin git://github.com/sugarlabs/sugar-web.git INFO:root:Running: git remote set-url origin git://github.com/sugarlabs/sugar-web.git INFO:root:Running command git fetch INFO:root:Running: git fetch INFO:root:From git://github.com/sugarlabs/sugar-web INFO:root: 0c0d809..e46a2c6 master - origin/masterINFO:root:Running command git checkout 139a0c161288f7652ce419d236e7bc4f45a7a2bc INFO:root:Running: git checkout 139a0c161288f7652ce419d236e7bc4f45a7a2bc INFO:root:Note: checking out '139a0c161288f7652ce419d236e7bc4f45a7a2bc'. INFO:root: INFO:root:You are in 'detached HEAD' state. You can look around, make experimental INFO:root:changes and commit them, and you can discard any commits you make in this INFO:root:state without impacting any branches by performing another checkout. INFO:root: INFO:root:If you want to create a new branch to retain commits you create, you may INFO:root:do so (now or later) by using -b with the checkout command again. Example: INFO:root: INFO:root: git checkout -b new_branch_name INFO:root: INFO:root:HEAD is now at 139a0c1... Moving datastore functional tests to separate file INFO:root:sugar-web HEAD: 139a0c161288f7652ce419d236e7bc4f45a7a2bc looks that HEAD had been with the master branch files? -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] sucrose-0.100 fails
Instead full-sucrose-0.100: INFO:root:Running command git remote set-url origin git:// github.com/sugarlabs/sugar-web.git INFO:root:Running: git remote set-url origin git:// github.com/sugarlabs/sugar-web.git INFO:root:Running command git fetch INFO:root:Running: git fetch INFO:root:From git://github.com/sugarlabs/sugar-web INFO:root: 0c0d809..e46a2c6 master - origin/master INFO:root:Running command git checkout sucrose-0.100 INFO:root:Running: git checkout sucrose-0.100 INFO:root:Already on 'sucrose-0.100' INFO:root:Running command git merge --ff-only origin/sucrose-0.100 INFO:root:Running: git merge --ff-only origin/sucrose-0.100 INFO:root:Already up-to-date. INFO:root:sugar-web HEAD: d4632b00dcdd8b973480d0750c74579daa611e5d but fails for other reason: http://buildbot.sugarlabs.org/builders/full-sucrose-0.100/builds/45/steps/shell_3/logs/modules 2014/1/7 Rogelio Mita rogeliom...@activitycentral.com sorry, this is correct pull log (build #142): http://buildbot.sugarlabs.org/builders/quick-sucrose-0.100/builds/142 2014/1/7 Rogelio Mita rogeliom...@activitycentral.com I don't understand why sucrose-0.100 is pulling the master branch of sugar-web. /build/modules.jsonhttps://github.com/sugarlabs/sugar-build/blob/sucrose-0.100/build/modules.json#L117 has set sucrose-0.100 branch for sugar-web. pull loghttp://buildbot.sugarlabs.org/builders/quick-sucrose-0.100/builds/143/steps/shell/logs/log : INFO:root:Running command git remote set-url origin git://github.com/sugarlabs/sugar-web.git INFO:root:Running: git remote set-url origin git://github.com/sugarlabs/sugar-web.git INFO:root:Running command git fetch INFO:root:Running: git fetch INFO:root:From git://github.com/sugarlabs/sugar-web INFO:root: 0c0d809..e46a2c6 master - origin/masterINFO:root:Running command git checkout 139a0c161288f7652ce419d236e7bc4f45a7a2bc INFO:root:Running: git checkout 139a0c161288f7652ce419d236e7bc4f45a7a2bc INFO:root:Note: checking out '139a0c161288f7652ce419d236e7bc4f45a7a2bc'. INFO:root: INFO:root:You are in 'detached HEAD' state. You can look around, make experimental INFO:root:changes and commit them, and you can discard any commits you make in this INFO:root:state without impacting any branches by performing another checkout. INFO:root: INFO:root:If you want to create a new branch to retain commits you create, you may INFO:root:do so (now or later) by using -b with the checkout command again. Example: INFO:root: INFO:root: git checkout -b new_branch_name INFO:root: INFO:root:HEAD is now at 139a0c1... Moving datastore functional tests to separate file INFO:root:sugar-web HEAD: 139a0c161288f7652ce419d236e7bc4f45a7a2bc looks that HEAD had been with the master branch files? -- Roger Activity Central http://activitycentral.com/ -- Roger Activity Central http://activitycentral.com/ -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] sugar-web activity
Maybe this can help you: http://developer.sugarlabs.org/activity.md.html#adding%20a%20button%20to%20the%20toolbar 2013/12/27 Rafael Cordano rafael.cord...@gmail.com Hello, I'm making a port of an activity to sugar-web and I don't know how I can make a palette? Greetings: Rafael Cordano ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Frequent buildbot check failures in sugar-web
https://github.com/sugarlabs/sugar-web/pull/102 2013/12/12 Daniel Narvaez dwnarv...@gmail.com Right, as expected 1386897905.351919 DEBUG root: IndexStore.flush: force=True _pending_writes=0 1386897905.352442 DEBUG root: Start database flush 1386897909.310487 DEBUG root: Completed database flush 1386897909.334923 DEBUG root: FileStore: Nothing to do Only on the first save(). Using *getEnv*().*defaultTimeoutInterval* = something we could increase the timeout for all the datastore tests or even for all the tests. I'm worried it would get a bit annoying for development to always have a big timeout... An alternative could be to have a speficic test at the top to get through this, with a title explaining what it's doing, so that we wouldn't keep breaking it. I dunno... thoughts? Patches welcome too, if anyone has more time than me! -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [web-activity] functional tests and env.isStandalone's current implementation
2013/12/20 Daniel Narvaez dwnarv...@gmail.com What about using the user agent in isStandalone instead of the protocol? We can make the web activity and the sugar-web-test use two different, recognizable user agents. sorry I don't understand how this will help us, the expected is that sugar-web-test and a web activity running in sugar platform should have same behavior, isStandalone? - false, right? or I think don't follow your idea =) In unit test is not a problem at all, we just mock spyOn(env, isStandalone).andReturn(false) then we are in sugar mode, but integration tests in some way, we should have a environment more close to actual, isStandalone should return false without necessity of mocking him, IMHO. -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [web-activity] functional tests and env.isStandalone's current implementation
ok!, I understand you now, yes, can work using user agent 2013/12/20 Rogelio Mita rogeliom...@activitycentral.com 2013/12/20 Daniel Narvaez dwnarv...@gmail.com What about using the user agent in isStandalone instead of the protocol? We can make the web activity and the sugar-web-test use two different, recognizable user agents. sorry I don't understand how this will help us, the expected is that sugar-web-test and a web activity running in sugar platform should have same behavior, isStandalone? - false, right? or I think don't follow your idea =) In unit test is not a problem at all, we just mock spyOn(env, isStandalone).andReturn(false) then we are in sugar mode, but integration tests in some way, we should have a environment more close to actual, isStandalone should return false without necessity of mocking him, IMHO. -- Roger Activity Central http://activitycentral.com/ -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [web-activity] functional tests and env.isStandalone's current implementation
All sugar-web's tests are running into activityweb container, using sugar-web-test activity, all url requests which they do, have http scheme, and our current implementation of isStandanlone makes check on the current scheme of the request given (isStandalone methodhttps://github.com/sugarlabs/sugar-web/blob/master/env.js#L40), then... functional tests believe are in standalone mode when they use isStandalone method. Mocking this method on unit tests is ok... but we think is not good idea mocking this on functional tests... or yes??? Thoughts: think alternative implementation for this method? hacking the scheme from sugar-web-test? What do you think? Best regards! -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [web-activity] functional tests and env.isStandalone's current implementation
2013/12/19 Daniel Narvaez dwnarv...@gmail.com On 19 December 2013 21:48, Rogelio Mita rogeliom...@activitycentral.comwrote: All sugar-web's tests are running into activityweb container, using sugar-web-test activity, all url requests which they do, have http scheme, and our current implementation of isStandanlone makes check on the current scheme of the request given (isStandalone methodhttps://github.com/sugarlabs/sugar-web/blob/master/env.js#L40), then... You mean activity scheme right? yes! When run karma tests, the scheme is http, is not activity functional tests believe are in standalone mode when they use isStandalone method. Mocking this method on unit tests is ok... but we think is not good idea mocking this on functional tests... or yes??? Can you explain what you mean with functional tests? (perhaps just lacking terminology on my side). I mean integration tests http://en.wikipedia.org/wiki/Integration_testing =) -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [sugar-web] do webkit frames run on different threads?
2013/12/19 Daniel Narvaez dwnarv...@gmail.com This code in getEnvironment is wrong, just a thinko by me. We should not set window.top.sugar = {} from the javascript side. Instead we should if isStandalone callback({}). This is related with [web-activity] functional tests and env.isStandalone's current implementation email, we were trying to do this, and we find with this questions... -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Frequent buildbot check failures in sugar-web
2013/12/12 Daniel Narvaez dwnarv...@gmail.com Only on the first save(). Using *getEnv*().*defaultTimeoutInterval* = something we could increase the timeout for all the datastore tests or even for all the tests. I'm worried it would get a bit annoying for development to always have a big timeout... An alternative could be to have a speficic test at the top to get through this, with a title explaining what it's doing, so that we wouldn't keep breaking it. I dunno... thoughts? Patches welcome too, if anyone has more time than me! oh!, now we have a lot of information about, let me collect and understand better the situation before send a more complete answer -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Frequent buildbot check failures in sugar-web
2013/12/13 Code Raguet irag...@activitycentral.com Only on the first save(). Using getEnv().defaultTimeoutInterval = something we could increase the timeout for all the datastore tests or even for all the tests. I'm worried it would get a bit annoying for development to always have a big timeout... Perhaps we should do as in env.js... Adding anachronistic unit-tests (tests that check the logic in isolation, mocking and stubbing the external services and deps) that would run faster, hence lighting the development process. +1 Also, moving those heavier tests (whose check through the actual implementation) to another file that, developers would run after a long round of development (before pushing, for example) or just leaving that job to buildbot. Therefore, we would have the benefit that the current tests give (keeping big timeouts, may be) without delaying developers. +1. This point is an advantage to run tests on any basic browser if is necessary in any time. Then we can do: - separate this functional tests on another file and run it on full-master maybe for first approach? - solve on temporary way using increasing timeout (if we see that this approach works...) - doing unit tests for datastore.js I think... now it works (always assuming that higher time, we reduce or avoid completely the probability of failure of the tests, to see...), just that it is sometimes a bit slow datastore labor, we should take note to solve in the future, but inevitably we should have unit tests here and be sure that the functional tests on full-master run well, even a little slow the running time of the tests. On Fri, Dec 13, 2013 at 2:48 PM, Rogelio Mita rogeliom...@activitycentral.com wrote: 2013/12/12 Daniel Narvaez dwnarv...@gmail.com Only on the first save(). Using *getEnv*().*defaultTimeoutInterval* = something we could increase the timeout for all the datastore tests or even for all the tests. I'm worried it would get a bit annoying for development to always have a big timeout... An alternative could be to have a speficic test at the top to get through this, with a title explaining what it's doing, so that we wouldn't keep breaking it. I dunno... thoughts? Patches welcome too, if anyone has more time than me! oh!, now we have a lot of information about, let me collect and understand better the situation before send a more complete answer -- Roger Activity Central http://activitycentral.com/ -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Frequent buildbot check failures in sugar-web
2013/12/12 Gonzalo Odiard gonz...@laptop.org Datastore api have a few places with comments about function/methods than should be async, but are sync. Ex: https://github.com/sugarlabs/sugar-toolkit-gtk3/blob/master/src/sugar3/datastore/datastore.py#L369 No idea about if is related, just a comment. good point Gonzalo, finishing with env.js we will move to review datastore at any time. Daniel, I think we can increase the timeout until we can find a solution? while we work on a solution we can go see if timeout issue related to some slowness issue, maybe. -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Frequent buildbot check failures in sugar-web
2013/12/12 Gonzalo Odiard gonz...@laptop.org breaking carefully :) don't worry! the idea is not to change anything without testing, datastore has enough tests, first of all we would begin to look at these =) -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Frequent buildbot check failures in sugar-web
2013/12/11 Daniel Narvaez dwnarv...@gmail.com That's not enough to say if python is never sending the message or if javascript is never receiving/handling it. So I make gwebsockets log sent messages to... when we get the next failure we can check if that helps figuring out what is going on. Sorry, I see that now =) -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Frequent buildbot check failures in sugar-web
2013/12/12 Daniel Narvaez dwnarv...@gmail.com Interesting that he has different tests failing, on buildbot it seems to be always the same. Maybe he can try to osbuild pull, try to reproduce again, and post build/logs/check-modules.log? Seeing a slightly different failure might help us understanding. The timeout is 5 seconds so it's probably long enough. I suspect more some kind of race either in apisocket.py, in the js datastore code or in gwebsockets itself. Let's see if the logs tells us something more. Sorry I missed this email!, ok, I will post that log when fails again -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Frequent buildbot check failures in sugar-web
2013/12/12 Gonzalo Odiard gonz...@laptop.org Just remember than this is different to env.js, we have already a lot of users of this api, then we need look how to solve these issues I catch your point here, the idea is not change the API usage, because motive you said above, or if it changes anyway, we should take care with backward compatibility, but the intention to explore that code, is find the problem that we have now, a race condition o some wrong logic, or with much lucky, a wrong written test =), is very important that you are saying here, thanks for mention it -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] web-activity: env.getEnvironment dependency with Python code
Hi Daniel, when you have a moment can you check this pull request that repairs this functional testhttps://github.com/sugarlabs/sugar-web/blob/master/test/envSpec.js#L7which no was running https://github.com/sugarlabs/sugar-web/pull/96 Thanks! 2013/12/2 Rogelio Mita rogeliom...@activitycentral.com ok, thanks! 2013/12/2 Daniel Narvaez dwnarv...@gmail.com Github is a bit broken at the moment, but I'll try to finish up reviewing later tonight. Thanks. On Monday, 2 December 2013, Code Raguet wrote: On Thu, Nov 28, 2013 at 3:26 PM, Daniel Narvaez dwnarv...@gmail.comwrote: Those are hard questions :) I was also thinking about compatibility with old sugar-toolkit-gtk3 versions when we change stuff like getEnvironment. For future changes on this, we add some unitttest, so refactoring should be safer https://github.com/sugarlabs/sugar-web/pull/94 Please, can anyone review this pull-request?? What about having two configurations, one for Sugar running only inside sugar-build (what we have now), the other running into a normal web browser running outside sugar-build. Seems like this would ensure functionality of the contracts we currently care about? The sugar-web inside sugar-build would break if sugar-toolkit-gtk3 doesn't fulfil the the contract. This is a good idea, but I'm not sure if it's priority right now... perhaps in the short term this would bring-up again and we may revisit this issue. There is a difference between testing that getEnvironment works or that the bits getEnvironment depend on (window.sugar) works as expected. Perhaps where we think that difference might matter we could also have tests which tests only the contract with toolkit, without other code layers in the middle. But getEnvironment is so thin that it probably doesn't matter at the moment.. +1 We would need to figure out how to automate tests in a normal web browser, but shouldn't be much of a problem. Roger, pointed me out that datastoreSpec mainly fails on standalone mode... perhaps we should review those tests to find out if they can be fixed. But it's not enough for having two configs, yet, IMHO. PS: we would like to rework a bit env.js, but we need the new unit tests merged in order to continue. If someone can review them soon will be appreciated. -- Daniel Narvaez -- Roger Activity Central http://activitycentral.com/ -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] web-activity: env.getEnvironment dependency with Python code
And this pull request: https://github.com/sugarlabs/sugar-web/pull/97 change some semantics on https://github.com/sugarlabs/sugar-web/blob/master/test/envSpec.js#L129test and till now we have only this particular case behavior in our API 2013/12/11 Rogelio Mita rogeliom...@activitycentral.com Hi Daniel, when you have a moment can you check this pull request that repairs this functional testhttps://github.com/sugarlabs/sugar-web/blob/master/test/envSpec.js#L7which no was running https://github.com/sugarlabs/sugar-web/pull/96 Thanks! 2013/12/2 Rogelio Mita rogeliom...@activitycentral.com ok, thanks! 2013/12/2 Daniel Narvaez dwnarv...@gmail.com Github is a bit broken at the moment, but I'll try to finish up reviewing later tonight. Thanks. On Monday, 2 December 2013, Code Raguet wrote: On Thu, Nov 28, 2013 at 3:26 PM, Daniel Narvaez dwnarv...@gmail.comwrote: Those are hard questions :) I was also thinking about compatibility with old sugar-toolkit-gtk3 versions when we change stuff like getEnvironment. For future changes on this, we add some unitttest, so refactoring should be safer https://github.com/sugarlabs/sugar-web/pull/94 Please, can anyone review this pull-request?? What about having two configurations, one for Sugar running only inside sugar-build (what we have now), the other running into a normal web browser running outside sugar-build. Seems like this would ensure functionality of the contracts we currently care about? The sugar-web inside sugar-build would break if sugar-toolkit-gtk3 doesn't fulfil the the contract. This is a good idea, but I'm not sure if it's priority right now... perhaps in the short term this would bring-up again and we may revisit this issue. There is a difference between testing that getEnvironment works or that the bits getEnvironment depend on (window.sugar) works as expected. Perhaps where we think that difference might matter we could also have tests which tests only the contract with toolkit, without other code layers in the middle. But getEnvironment is so thin that it probably doesn't matter at the moment.. +1 We would need to figure out how to automate tests in a normal web browser, but shouldn't be much of a problem. Roger, pointed me out that datastoreSpec mainly fails on standalone mode... perhaps we should review those tests to find out if they can be fixed. But it's not enough for having two configs, yet, IMHO. PS: we would like to rework a bit env.js, but we need the new unit tests merged in order to continue. If someone can review them soon will be appreciated. -- Daniel Narvaez -- Roger Activity Central http://activitycentral.com/ -- Roger Activity Central http://activitycentral.com/ -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] python_joven
Congratulations!!! Nice work guys =) ! 2013/12/6 Gonzalo Odiard gonz...@laptop.org Python Joven is a example to follow, I hope we see more places doing something similar. Is really good have all the tutorials published! Thanks Flavio! Gonzalo On Fri, Dec 6, 2013 at 2:32 PM, Flavio Danesse fdane...@gmail.com wrote: [image: Imágenes integradas 1] web https://sites.google.com/site/pythonjoven/ photographshttps://sites.google.com/site/pythonjoven/home/fotografias videos and interviewshttps://sites.google.com/site/pythonjoven/home/videos-y-entrevistas ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Adding compatibility in webactivity to webkit1
2013/12/4 Daniel Narvaez dwnarv...@gmail.com This is a good concrete example of what worries me. Assuming the custom protocol is a slightly better solution (it might not be, it's a bit hard to evaluate but... for the sake of this dicussion let's assume it is), what do we do? *I think in a loud voice and I mean...* If it is feasible (web-server for both), I'm a bit extreme but... I prefer to have a single protocol for both or have no support at all, thinking something in the middle it is not a good idea =S -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Adding compatibility in webactivity to webkit1
2013/12/4 Daniel Narvaez dwnarv...@gmail.com I see your point of course. Though if we can keep the webkit2 implementation the best it can be and, at the same time, allow people like Gonzalo to provide rudimentary support for web activities in deployed/ing software, maybe it's a good compromise... (Thinking out loud too). +1 -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Adding compatibility in webactivity to webkit1
2013/12/3 Daniel Narvaez dwnarv...@gmail.com What do you mean with emergence of sugar-toolkit-gtk3? I do not know the story of how this package came, when.., the main purpose.., not that long ago I'm on this list On Tuesday, 3 December 2013, Rogelio Mita wrote: I need more context about emergence of sugar-toolkit-gtk3 but... I am agree with that points: Gonzalo says: Another alternative is find what is crashing in webkit2 and solve it, but is out of my knowledge. Always is an alternative write code for cover backward compatibility if there are all pertinent tests to cover this features with all the effort that this entails, so we need to think very carefull on that choice like Daniel said: I'm not completely convinced we should support webkit1 yet. I'm worried it will be pretty painful to maintain. Maybe we can ask us: *To whom these problems affect?*. If is possible answer this questions, this can help us to take a choise. Anyway, seems risky write two different backends for a short terms usage. Is it possible? - sure, but seems a lot of work, I think that is unneccessary for a short term, IMHO. Other risk is expand a module that is recently born such as sugar-web that I think the goal is no clear in the horizont yet, I think that keep it small this is a good desition right now until that the usage be more clear, I mean, android, simple browser and XO is an wide spectrum to cover, if we not have clarity that this serves for its purpose, add backward support right now, is overhead in my oppinion. 2013/12/2 Daniel Narvaez dwnarv...@gmail.com I'd really like to get feedback from more people about this! Ccing sugar-web contributors. On Wednesday, 27 November 2013, Gonzalo Odiard wrote: When we started the work in web activities, we decided work with webkit2, because is possible solve a few problems in the client side, without need a local webserver. But right now, in the XOs, we have F18 working, and Webkit2 crashes, then I didn't find other solution than modify webactivity to work with webkit1. That code was included in the rpms I prepared and the testing images. I would like propose include this change in master, used only when a environment variable is set, to make easier the testing, and be sure the changes we do works in both webkit1 and webkit2. A first proposal is available here https://github.com/sugarlabs/sugar-toolkit-gtk3/pull/54 Thoughts? Gonzalo -- Daniel Narvaez -- Roger Activity Central http://activitycentral.com/ -- Daniel Narvaez ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Frequent buildbot check failures in sugar-web
Sometimes when check command is running, it calls karma without configuration file then fails, any idea why?. Anyway, right now full-master fails before run sugar-web checker by two test on sugar-toolkit-gtk3: test_dist_source_out_of_source and test_dist_xo_out_of_source 2013/11/28 Rogelio Mita rogeliom...@activitycentral.com I will take note of this 2013/11/28 Daniel Narvaez dwnarv...@gmail.com http://buildbot.sugarlabs.org/builders/quick-sucrose-0.100/builds/6/steps/shell_2/logs/modules We are getting a lot of these, like 50% of the times. Unfortunately my laptop broke so I won't be able to debug them until it comes back repaired. Help sorting this out would be appreciated, especially if you are able to reproduce the issue locally. -- Daniel Narvaez ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Roger Activity Central http://activitycentral.com/ -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] web-activity: env.getEnvironment dependency with Python code
ok, thanks! 2013/12/2 Daniel Narvaez dwnarv...@gmail.com Github is a bit broken at the moment, but I'll try to finish up reviewing later tonight. Thanks. On Monday, 2 December 2013, Code Raguet wrote: On Thu, Nov 28, 2013 at 3:26 PM, Daniel Narvaez dwnarv...@gmail.comwrote: Those are hard questions :) I was also thinking about compatibility with old sugar-toolkit-gtk3 versions when we change stuff like getEnvironment. For future changes on this, we add some unitttest, so refactoring should be safer https://github.com/sugarlabs/sugar-web/pull/94 Please, can anyone review this pull-request?? What about having two configurations, one for Sugar running only inside sugar-build (what we have now), the other running into a normal web browser running outside sugar-build. Seems like this would ensure functionality of the contracts we currently care about? The sugar-web inside sugar-build would break if sugar-toolkit-gtk3 doesn't fulfil the the contract. This is a good idea, but I'm not sure if it's priority right now... perhaps in the short term this would bring-up again and we may revisit this issue. There is a difference between testing that getEnvironment works or that the bits getEnvironment depend on (window.sugar) works as expected. Perhaps where we think that difference might matter we could also have tests which tests only the contract with toolkit, without other code layers in the middle. But getEnvironment is so thin that it probably doesn't matter at the moment.. +1 We would need to figure out how to automate tests in a normal web browser, but shouldn't be much of a problem. Roger, pointed me out that datastoreSpec mainly fails on standalone mode... perhaps we should review those tests to find out if they can be fixed. But it's not enough for having two configs, yet, IMHO. PS: we would like to rework a bit env.js, but we need the new unit tests merged in order to continue. If someone can review them soon will be appreciated. -- Daniel Narvaez -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Adding compatibility in webactivity to webkit1
I need more context about emergence of sugar-toolkit-gtk3 but... I am agree with that points: Gonzalo says: Another alternative is find what is crashing in webkit2 and solve it, but is out of my knowledge. Always is an alternative write code for cover backward compatibility if there are all pertinent tests to cover this features with all the effort that this entails, so we need to think very carefull on that choice like Daniel said: I'm not completely convinced we should support webkit1 yet. I'm worried it will be pretty painful to maintain. Maybe we can ask us: *To whom these problems affect?*. If is possible answer this questions, this can help us to take a choise. Anyway, seems risky write two different backends for a short terms usage. Is it possible? - sure, but seems a lot of work, I think that is unneccessary for a short term, IMHO. Other risk is expand a module that is recently born such as sugar-web that I think the goal is no clear in the horizont yet, I think that keep it small this is a good desition right now until that the usage be more clear, I mean, android, simple browser and XO is an wide spectrum to cover, if we not have clarity that this serves for its purpose, add backward support right now, is overhead in my oppinion. 2013/12/2 Daniel Narvaez dwnarv...@gmail.com I'd really like to get feedback from more people about this! Ccing sugar-web contributors. On Wednesday, 27 November 2013, Gonzalo Odiard wrote: When we started the work in web activities, we decided work with webkit2, because is possible solve a few problems in the client side, without need a local webserver. But right now, in the XOs, we have F18 working, and Webkit2 crashes, then I didn't find other solution than modify webactivity to work with webkit1. That code was included in the rpms I prepared and the testing images. I would like propose include this change in master, used only when a environment variable is set, to make easier the testing, and be sure the changes we do works in both webkit1 and webkit2. A first proposal is available here https://github.com/sugarlabs/sugar-toolkit-gtk3/pull/54 Thoughts? Gonzalo -- Daniel Narvaez -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Frequent buildbot check failures in sugar-web
I will take note of this 2013/11/28 Daniel Narvaez dwnarv...@gmail.com http://buildbot.sugarlabs.org/builders/quick-sucrose-0.100/builds/6/steps/shell_2/logs/modules We are getting a lot of these, like 50% of the times. Unfortunately my laptop broke so I won't be able to debug them until it comes back repaired. Help sorting this out would be appreciated, especially if you are able to reproduce the issue locally. -- Daniel Narvaez ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] web-activity: env.getEnvironment dependency with Python code
2013/11/27 Daniel Narvaez dwnarv...@gmail.com My summary email is still valid but for completeness... I'm not sure it's possible even from inside webkit to implement a non-racy window-object-cleared signal. sounds good, I'm sure that python WebKit2 has to provide some solution to this without having to go down a level, if our plan does not work, surely on the list of webkit are going to tell us the right way, when I can, I will try to do the plan Regards! -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Adding compatibility in webactivity to webkit1
Nice!, I quickly looked at the patch and I urged try to encapsulate the all logic of webkit2 and the webkit1 in separate modules, using a luck of strategy pattern or do something polymorphic, but I notice that it is a decision not yet taken (as Daniel says), I doubt whether to spend time on this for that reason, you will say, however when this decision is finally decided, I would like to make note of this style refactor to have clean webactivity module, which is relatively new and keep small, you think? Regards! 2013/11/27 Gonzalo Odiard gonz...@laptop.org On Wed, Nov 27, 2013 at 1:04 PM, Daniel Narvaez dwnarv...@gmail.comwrote: I think it's good to have this upstream because otherwise changes to sugar-web will easily break webkit1 support. I'm not completely convinced we should support webkit1 yet. I'm worried it will be pretty painful to maintain. It should be possible to port webkitgtk 2.2 to Fedora 18... Maybe, but have many other dependencies to update. Another alternative is find what is crashing in webkit2 and solve it, but is out of my knowledge. Gonzalo ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Adding compatibility in webactivity to webkit1
I mean, because the goal is remove in the future, we need isolate this logic in a separate module to make this transparency on webactivity module, this is what I mean. And the elimination process should be going to the main module (webactivity) which is a kind of controller in this case and then remove 3 or 4 lines that use an interface responsible for providing support for webkit1, I think 2013/11/27 Gonzalo Odiard gonz...@laptop.org I am not opposed to alternative implementations, if we can keep it simple. This is a workaround for a problem, in the end, we want remove it, when is not needed anymore. Gonzalo On Wed, Nov 27, 2013 at 2:22 PM, Rogelio Mita rogeliom...@activitycentral.com wrote: Nice!, I quickly looked at the patch and I urged try to encapsulate the all logic of webkit2 and the webkit1 in separate modules, using a luck of strategy pattern or do something polymorphic, but I notice that it is a decision not yet taken (as Daniel says), I doubt whether to spend time on this for that reason, you will say, however when this decision is finally decided, I would like to make note of this style refactor to have clean webactivity module, which is relatively new and keep small, you think? Regards! 2013/11/27 Gonzalo Odiard gonz...@laptop.org On Wed, Nov 27, 2013 at 1:04 PM, Daniel Narvaez dwnarv...@gmail.comwrote: I think it's good to have this upstream because otherwise changes to sugar-web will easily break webkit1 support. I'm not completely convinced we should support webkit1 yet. I'm worried it will be pretty painful to maintain. It should be possible to port webkitgtk 2.2 to Fedora 18... Maybe, but have many other dependencies to update. Another alternative is find what is crashing in webkit2 and solve it, but is out of my knowledge. Gonzalo ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Roger Activity Central http://activitycentral.com/ -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] web-activity: env.getEnvironment dependency with Python code
Ok, working on that we have these situations: *Context:* - Hard dependecy between repos: sugar-toolkit-gtk3 -- sugar-web - Exists only one functional test (Test interaction/contracts between classes) that is not working, ref: https://github.com/sugarlabs/sugar-web/blob/master/test/envSpec.js#L5 - We need have 4 unit test, one per each logic condition in lines 10https://github.com/sugarlabs/sugar-web/blob/master/env.js#L10, 12 https://github.com/sugarlabs/sugar-web/blob/master/env.js#L12, 17https://github.com/sugarlabs/sugar-web/blob/master/env.js#L17, 21 https://github.com/sugarlabs/sugar-web/blob/master/env.js#L21 *Plan:* - *sugar-web:* - Doing missing unit tests to begin refactoring for no lead to breakage in existing code - Repair functional test that not running now, if is necessary - Make refactor - *sugar-toolkit-gtk3:* - same above - *sugar-web and sugar-toolkit-gtk3:* - Doing functional test to cover the communication between both - Make refactor *Questions:* - *Where is the right flow to avoid inconcistence between repos?* - I mean, if we assume right behaviour on sugar-toolkit-gtk3 and will write code on sugar-web, the sugar-web functionallity only works if sugar-toolkit-gtk3 is also working right and fulfilling the contract - *Where is the right place to put the test of this contract above?* - One idea is make a karma configuration that only works on osbuild. - Other idea is doing manually =, and no place - Other... tying sugar-web to their tests are always executed in osbuild =((( Regards! 2013/11/27 Gonzalo Odiard gonz...@laptop.org Ok On Wed, Nov 27, 2013 at 10:48 AM, Daniel Narvaez dwnarv...@gmail.comwrote: The env variable should be fine. Though can you open a thread about supporting webkit1? I think it's a major decision and we should ensure everyone is in the loop, especially since we had decided to support webkit2 only in the kick of meeting. On Wednesday, 27 November 2013, Gonzalo Odiard wrote: On Wed, Nov 27, 2013 at 10:33 AM, Daniel Narvaez dwnarv...@gmail.comwrote: It *might* not be possible to use the same approach on both. Though, interestingly, this is much easier on webkit1 so one way or another it should be possible to make it work. We need to merge support for webkitgtk1 upstream if we want upstream patches to be required to not break it. True. If you agree, I can go with the option of the env variable as discussed previously. Gonzalo On Wednesday, 27 November 2013, Gonzalo Odiard wrote: Please remember we will be using web activities with Webkit1 for a while. Just a note, to be sure we don't go for something Webkit2 only. Gonzalo On Wed, Nov 27, 2013 at 10:16 AM, Rogelio Mita rogeliom...@activitycentral.com wrote: 2013/11/27 Daniel Narvaez dwnarv...@gmail.com My summary email is still valid but for completeness... I'm not sure it's possible even from inside webkit to implement a non-racy window-object-cleared signal. sounds good, I'm sure that python WebKit2 has to provide some solution to this without having to go down a level, if our plan does not work, surely on the list of webkit are going to tell us the right way, when I can, I will try to do the plan Regards! -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Daniel Narvaez -- Daniel Narvaez -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] Web-activity: Store API documentation
Hi! I was doing use of dictstore API on my POC web activity and I found in the position to want do: save data when closing activity, trying things and reading source code I found this paragraph that helped me to do this task: https://github.com/sugarlabs/sugar-web/blob/master/activity/activity.js#L30 // An activity that handles 'activityStop' can also call // event.preventDefault() to prevent the close, and explicitly // call activity.close() after storing. This information is very useful, my propose is start this thread to discuss the way to documenting Storage API. The first proposal/task: - Make a section on http://developer.sugarlabs.org/ called Storing information or something like, and: - Migrate this commenthttps://github.com/sugarlabs/sugar-web/blob/master/activity/activity.js#L30to this doc page - Make a test or example that describe this situation: Save when closing we activity - Fetch comments similar to that on source code and do same flow - Make a introduction of dictstore API and document it Regards! -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Web-activity: Store API documentation
I will take note of this 2013/11/26 Daniel Narvaez dwnarv...@gmail.com We didn't really write much API docs yet (bad us) but the idea is to use docker js. http://jbt.github.io/docker/src/docker.js.html In theory this should allow free form docs while keeping them inside the code, which is usually good to avoid them becoming stale. On Tuesday, 26 November 2013, Rogelio Mita wrote: Hi! I was doing use of dictstore API on my POC web activity and I found in the position to want do: save data when closing activity, trying things and reading source code I found this paragraph that helped me to do this task: https://github.com/sugarlabs/sugar-web/blob/master/activity/activity.js#L30 // An activity that handles 'activityStop' can also call // event.preventDefault() to prevent the close, and explicitly // call activity.close() after storing. This information is very useful, my propose is start this thread to discuss the way to documenting Storage API. The first proposal/task: - Make a section on http://developer.sugarlabs.org/ called Storing information or something like, and: - Migrate this commenthttps://github.com/sugarlabs/sugar-web/blob/master/activity/activity.js#L30to this doc page - Make a test or example that describe this situation: Save when closing we activity - Fetch comments similar to that on source code and do same flow - Make a introduction of dictstore API and document it Regards! -- Roger Activity Central http://activitycentral.com/ -- Daniel Narvaez -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] sugar-web: env.js questions
Hi, Can you help me to understand the getEnvironment function ( https://github.com/sugarlabs/sugar-web/blob/master/env.js)?. My understanding is that if sugar.environment is undefined is because I am in standalone mode, is that right? what is the purpose of this handler onEnvironmentSet ( https://github.com/sugarlabs/sugar-web/blob/master/env.js#L22)? I am running all tests (with karma but with a Chfome browser, no in sugar environment) and I noted some rare: when is running this test: https://github.com/sugarlabs/sugar-web/blob/master/test/envSpec.js is SUCCESS, I can't underestand why. Regards! -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] sugar-web: env.js questions
2013/11/22 Daniel Narvaez dwnarv...@gmail.com Oh actually I see why it succeeds... The test doesn't verify that it receives a response. It will only fail if it gets the wrong answer (and it probably it's not always to fail in that case either). We need to follow the async pattern we have in the datastore test. Though first maybe best to decide what we want to do with getEnvironment exactly... You mean that never is executed the callback passed into getEnvironmnet, because never occur python notification which should be responsible for executing this callback? -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] sugar-web: env.js questions
2013/11/22 Daniel Narvaez dwnarv...@gmail.com Yes the callback is never executed because there is no python notification. And our test succeeds because it doesn't make sure that the callback is called. Ok, I see... I am watching https://github.com/sugarlabs/sugar-toolkit-gtk3/blob/master/src/sugar3/activity/webactivity.py#L89and I can see if we are in standalone mode this fragment of code is not executed (obvious because the activity is not started from sugar) then we don't have *window.suga*r global var, and I think that it is good and need be maintained through all cycle (is understood?). I mean, if you are in *standalone mode* you should not exist *global sugar var*, and in the client side, the logic for *onStandalone* method *is check that sugar var existence*. Because I noted the behaviour when *sugar var* don't exists on client side, this fragment https://github.com/sugarlabs/sugar-web/blob/master/env.js#L13creates this variable anyway and I do not understand why. I propose remove this fragment at the moment and make a method activity.onStandalone (as was already discussed with Manu, I remember) and the logic can be: checks existence of sugar var, make sence? -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] sugar-web: env.js questions
2013/11/22 Daniel Narvaez dwnarv...@gmail.com On 22 November 2013 21:20, Rogelio Mita rogeliom...@activitycentral.comwrote: 2013/11/22 Daniel Narvaez dwnarv...@gmail.com Yes the callback is never executed because there is no python notification. And our test succeeds because it doesn't make sure that the callback is called. Ok, I see... I am watching https://github.com/sugarlabs/sugar-toolkit-gtk3/blob/master/src/sugar3/activity/webactivity.py#L89and I can see if we are in standalone mode this fragment of code is not executed (obvious because the activity is not started from sugar) then we don't have *window.suga*r global var, and I think that it is good and need be maintained through all cycle (is understood?). I mean, if you are in *standalone mode* you should not exist *global sugar var*, Yeah I think setting that variable is wrong. I probably know why I did it but I was just missing something. We should remove that... and in the client side, the logic for *onStandalone* method *is check that sugar var existence*. Because I noted the behaviour when *sugar var* don't exists on client side, this fragmenthttps://github.com/sugarlabs/sugar-web/blob/master/env.js#L13creates this variable anyway and I do not understand why. I propose remove this fragment at the moment and make a method activity.onStandalone (as was already discussed with Manu, I remember) and the logic can be: checks existence of sugar var, make sence? I think I was the one suggesting to add an isStandalone method. But after looking into it a bit more I tend tothink it's better to make getEnvironment pass null to the callback, it should make it easier to write code that works in both modes. About the logic, unfortunately checking window.sugar won't work because we can't assume window.sugar has been already set when getEnvironment is called... the python code you linked might be called after getEnvironment has been called and will erroneously think we are in standalone mode. you are right. I thought for a moment that this fragment is executed to begging before activity.setup(), I'm still in doubt, are you sure about this? That's why I suggested to check if window.location starts with activity://. It's a bit ugly but it will always work. Seems to be a good start, if I understand what you say, it would result there is no need to use callbacks in this method, ie: we can return object environment on sugar environment or null in other case, or better yet, ask to Environment model about the mode which is... var environment = env.getEnvironment(), though it sounds redundant... OR! var environment = activity.getEnvironment() sounds better to me, and ask to environment object everything related to him You likes some these ideas? -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] sugar-web: env.js questions
2013/11/22 Daniel Narvaez dwnarv...@gmail.com On 22 November 2013 22:59, Rogelio Mita rogeliom...@activitycentral.comwrote: About the logic, unfortunately checking window.sugar won't work because we can't assume window.sugar has been already set when getEnvironment is called... the python code you linked might be called after getEnvironment has been called and will erroneously think we are in standalone mode. you are right. I thought for a moment that this fragment is executed to begging before activity.setup(), I'm still in doubt, are you sure about this? The python code is executed when the page (with all it's resources) has been loaded. And I think that can happen either after or before javascript activity.setup(), depending on the page, hardware etc. That's why I suggested to check if window.location starts with activity://. It's a bit ugly but it will always work. Seems to be a good start, if I understand what you say, it would result there is no need to use callbacks in this method, ie: we can return object environment on sugar environment or null in other case Nope. getEnvironment will still need to be async because in the non-standalone case you need to wait for that python code to be executed. u are right, I missed You could have a env.isStandalone() method (no callback) but I have the feeling that would make the code using env.getEnvironment more complicated. Actually I think we should probably have both. Add env.isStandalone() and when that's true make getEnvironment() pass {} to the callback. How does that sound? This sounds good, in summary, We should have the logic of window.location in env.isStandalone method and env.getEnvironment still like now but uses IsStandalone like you say above, this will allow eliminating this logic herehttps://github.com/sugarlabs/sugar-web/blob/master/dictstore.js#L25 and here https://github.com/sugarlabs/sugar-web/blob/master/dictstore.js#L53(ussing isStandalone method), and dictstore become free from the asynchrony, right? This is all super-icky and difficult to explain, if you don't understand something I can try to clarify further. -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] sugar-web: env.js questions
2013/11/22 Daniel Narvaez dwnarv...@gmail.com You mean it will fix the race condition that I discussed with Code on that pull request right? If so, yes. yeah, that Ok, I'll try to make the changes according to what we discussed here and then I will send a pull request, is ok for you? Thanks -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] Issue running karma from osbuild shell
Hi list, when run *osbuild* with *run* command and there is not *resolution preference* in *prefs.json* file, the screen appear grey and it don't launch Sugar interface. I solved this with given 800x600 resolution on *prefs.json* file, but... my main goal is run *karma* for run tests, when I run *karma start sugar-web/test/karma.conf.js* into osbuild shell, seems that *resolution configuration* was no loaded from *prefs.js* and I have same problem above (grey screen and not Sugar UI). Someone comes up how to fix this? Thanks! -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Issue running karma from osbuild shell
It is a problem with x11 forwarding using ssh on my client machine, work perfectly from the host machine, thanks Daniel for attention! 2013/11/20 Daniel Narvaez dwnarv...@gmail.com And also the output of the run command. On 20 November 2013 18:35, Daniel Narvaez dwnarv...@gmail.com wrote: Can you post sugar-build/home/dotsugar/default/logs/shell.log (going by memory)? On 20 November 2013 18:33, Rogelio Mita rogeliom...@activitycentral.comwrote: Hi list, when run *osbuild* with *run* command and there is not *resolution preference* in *prefs.json* file, the screen appear grey and it don't launch Sugar interface. I solved this with given 800x600 resolution on *prefs.json* file, but... my main goal is run *karma* for run tests, when I run *karma start sugar-web/test/karma.conf.js* into osbuild shell, seems that *resolution configuration* was no loaded from *prefs.js* and I have same problem above (grey screen and not Sugar UI). Someone comes up how to fix this? Thanks! -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Daniel Narvaez -- Daniel Narvaez -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Web activities + CoffeeScript
2013/11/8 Manuel Quiñones ma...@laptop.org Hi Rogelio, On Thu, Nov 7, 2013 at 5:13 PM, Rogelio Mita rogeliom...@activitycentral.com wrote: Hi all!, working with web activities urges me to use CoffeeScript. - Is there any decision taken on this? - Do you discussed this topic in some occasion? or is irrelevant? It appeared a few times. In January when sugar-web didn't exist: http://lists.sugarlabs.org/archive/sugar-devel/2013-January/041616.html Then in August I wrote, after doing Gears activity: http://lists.sugarlabs.org/archive/sugar-devel/2013-August/05.html (GearSketch) It is written in coffeescript, and after playing for a bit, I can see it as a possible choice for activity developers. Its syntax sugar makes the code look more like the gtk activities written in python. +1 One of the reasons we went for plain js for sugar-web was because of the View Source feature. Well, seems that since I researched a few months ago, Source Maps has improved a lot, and I can see coffee code in the web inspector. If the code breaks or if I add a breakpoint, for example. Nice! Also, GitHub does a nice job displaying only the coffee changes, and hidding the JS changes by default: Nice!, also, I was playing a bit: - With the --map flag in coffee compiler I can use debbug function in browser - With a lib source-map-support.browser.js I can use error backtrace function in browser These points work in my chrome, but when using enable sourcemap on osbuild did not work any of the above points. What browser are using to web activities? So yes, it is a potable option for web activity developers. +1, but really wanted to understand what the problem through which osbuild not work. Now, in some real projects it happened to me that I started using Coffe or TypeScript and ended falling back to straight JS. Think about A. the compilation step B. no way to try things in the inspector console C. need to translate code examples and known solutions from JS to Coffee -- .. manuq .. Thanks Manuel! -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Web activities + CoffeeScript
2013/11/8 Daniel Narvaez dwnarv...@gmail.com We use webkitgtk 2.0.4. It's a few months old, I wonder if it would work in 2.2.x. Thanks Daniel, I'll do some research on those WebKitGTK versions about sourcemap. On Friday, 8 November 2013, Rogelio Mita wrote: 2013/11/8 Manuel Quiñones ma...@laptop.org Hi Rogelio, On Thu, Nov 7, 2013 at 5:13 PM, Rogelio Mita rogeliom...@activitycentral.com wrote: Hi all!, working with web activities urges me to use CoffeeScript. - Is there any decision taken on this? - Do you discussed this topic in some occasion? or is irrelevant? It appeared a few times. In January when sugar-web didn't exist: http://lists.sugarlabs.org/archive/sugar-devel/2013-January/041616.html Then in August I wrote, after doing Gears activity: http://lists.sugarlabs.org/archive/sugar-devel/2013-August/05.html (GearSketch) It is written in coffeescript, and after playing for a bit, I can see it as a possible choice for activity developers. Its syntax sugar makes the code look more like the gtk activities written in python. +1 One of the reasons we went for plain js for sugar-web was because of the View Source feature. Well, seems that since I researched a few months ago, Source Maps has improved a lot, and I can see coffee code in the web inspector. If the code breaks or if I add a breakpoint, for example. Nice! Also, GitHub does a nice job displaying only the coffee changes, and hidding the JS changes by default: Nice!, also, I was playing a bit: - With the --map flag in coffee compiler I can use debbug function in browser - With a lib source-map-support.browser.js I can use error backtrace function in browser These points work in my chrome, but when using enable sourcemap on osbuild did not work any of the above points. What browser are using to web activities? So yes, it is a potable option for web activity developers. +1, but really wanted to understand what the problem through which osbuild not work. Now, in some real projects it happened to me that I started using Coffe or TypeScript and ended falling back to straight JS. Think about A. the compilation step B. no way to try things in the inspector console C. need to translate code examples and known solutions from JS to Coffee -- .. manuq .. Thanks Manuel! -- Roger Activity Central http://activitycentral.com/ -- Daniel Narvaez It's good that we give importance to the use of Coffeescript as an alternative to a prototype-based language such as javascript, with all that implies, it will be very useful for who come to class-based languages such as Python. Thanks -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] My proposals to improve sugar:
2013/11/6 Flavio Danesse fdane...@gmail.com Thanks Daniel , I'll try again. I tried on several occasions to contribute in this way, but I see two problems : Generally not work in ubuntu and has the disadvantage that you can not prove what you do on the xo . The other problem is the time of applying patches , that is, if you get excited to make big changes with several days , in the code , you run the risk that none of the patches are applied. In my case , I think it would be better to work with someone who has the ability to fast track the contributions of code so you can go as you apply them or you can send instantly to object to keep moving forward in development. Walter : Thanks for the Spanish :) On the topic of mentoring in the contest , like last year, I prefer not to participate due to my limited English, if you like the ideas , feel free to post them for me, I 'd appreciate it. Gracias Daniel, intentaré nuevamente. Probé en varias oportunidades aportar de esta forma, pero le veo dos problemas: Generalmente no funcionaba en ubuntu y tiene el inconveniente de que no puedes probar lo que haces en la xo. El otro problema es el tiempo de aplicación de los parches, o sea, si te entusiasmas a hacer grandes modificaciones que lleven varios dias, en el código, corres el riesgo de que ninguno de los parches se apliquen. Una buena forma de solucionar esto, es hacer un parche grande, pero con commits muy atomicos, es decir, commits muy chicos para que sea mas fácil la revisión, y mejor el detalle de cada fragmento. Ademas de ser buena practica para no perderse uno mismo. Es una practica aveces muy dificil, pero hay buenas herramientas para uno exigirse a si mismo de hacerlo, como por ejemplo un reloj o alguna aplicación web que haga la tecnica de pomodoro. A good way to fix this is to make a large patch, but with very atomic commits, ie commits too small to make it easier to review, and better detail of each fragment. Apart from being good practice to not lose oneself. It is a practice sometimes difficult, but there are good tools to require yourself, such as a clock or any web application with pomodoro technique. En mi caso, creo que sería mejor trabajar en conjunto con alguien que tenga la capacidad de hacer un seguimiento rápido de los aportes de código de forma que pueda ir aplicándolos a medida que se envian o que pueda poner objeciones al instante para que no siga avanzando en el desarrollo. Veo que el código esta en en github, entonces esta la buena practica/herramienta de pull-request, para tener feedback rápido y poder hacer modificaciones que uno no ve y otros si. I see that the code is on github, then this good practice/tool pull-request method, to have quick feedback and to make changes that yourself not see but other colleagues can see. Walter: Gracias por el español :) Con respecto al tema de ser mentor en el concurso, al igual que el año pasado, prefiero no participar debido a mi limitado inglés, si te gustan las ideas propuestas, sientete en libertad de publicarlas por mi, yo te lo agradecería. 2013/11/6 Daniel Narvaez dwnarv...@gmail.com 2013/11/7 Flavio Danesse fdane...@gmail.com What someone explain a simple way to contribute code to sugar, I'm 5 years ago and I have been able to do so (the timers need help). Did you see these docs http://developer.sugarlabs.org/dev-environment.md.html http://developer.sugarlabs.org/contributing.md.html Happy to help out, here or in irc, if you run into any issues. ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel Están muy buenas las ideas que propusiste, quizás podemos levantar algún ticket! Very good ideas you proposed, perhaps we can raise a ticket! -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] Web activities + CoffeeScript
Hi all!, working with web activities urges me to use CoffeeScript. - Is there any decision taken on this? - Do you discussed this topic in some occasion? or is irrelevant? Regards! -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Web activities + CoffeeScript
sure 2013/11/7 Code ignacio.c...@gmail.com +1 Rogelio, if u are about to make an activity with coffee, can you try out source maps on webkit and share the results, please? On Thu, Nov 7, 2013 at 7:10 PM, Daniel Narvaez dwnarv...@gmail.comwrote: Very interesting. If they work in webkit then imo it doesn't make sense anymore to discourage coffee, minification, etc. (we have a bit about minification in the style guide that we should change to encourage source maps instead). On Thursday, 7 November 2013, Code wrote: there are source maps http://coffeescript.org/#source-maps to view source directly in modern browsers... On Thu, Nov 7, 2013 at 5:23 PM, Daniel Narvaez dwnarv...@gmail.comwrote: If I remember correctly we agreed to discourage it because it breaks view source. But of course it's up to the activity author ultimately. On Thursday, 7 November 2013, Rogelio Mita wrote: Hi all!, working with web activities urges me to use CoffeeScript. - Is there any decision taken on this? - Do you discussed this topic in some occasion? or is irrelevant? Regards! -- Roger Activity Central http://activitycentral.com/ -- Daniel Narvaez ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Daniel Narvaez -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] sugar-web - How to load non-AMD js modules / libs?
2013/11/4 Code irag...@activitycentral.com I think this is off-topic... BTW: perhaps you wanna see this thread from RequireJS' listhttps://groups.google.com/forum/#!searchin/requirejs/define$20syntax/requirejs/MEBMkF2KdF8/mxvC-pJiy8QJ where James Burke (core developer of RequireJS lib) talks about these syntax forms. If there is something realted to this to add, would u open a new thread, please? Getting back to the former topic (loading non-AMD modules): There is another approach, require.config() calls are additive, so it is possible to call config from other file than loader.js and require merges it. example of a require.config() from activity.js: https://gist.github.com/code-sur/7305059 ...loader.js stills as it is in sugar-web-template pros: * no need to modify loader.js * some developers would set other requirejs options cons: * whole config may spreads among many files The last con may be a pro if you want to clearly separete the framework config from the activity specific config +1 Reviewing the documentation (Write your own web activityhttp://developer.sugarlabs.org/activity.md.html) and noting that loader.js is in the place of not to modify files, sounds good con may be a pro and separete the framework config from the specific activity config is a sufficient reason for me. Having separate specific configuration is always a good idea. Code On Sun, Nov 3, 2013 at 7:56 PM, Rogelio Mita rogeliom...@activitycentral.com wrote: Thanks for answer! 2013/11/3 Daniel Narvaez dwnarv...@gmail.com Hi, As far as I know there is no good reason for that. Probably it was written when we wasn't very familiar with requirejs. I had already fixed one instance of this https://github.com/sugarlabs/sugar-web/commit/8c15d46ac5e6d2fe46db3588322ab2b92907987f On Sunday, 3 November 2013, Rogelio Mita wrote: a small intrigue was presented to us related to the way of defining the requirejs activity module: https://github.com/sugarlabs/sugar-web-template/blob/master/js/activity.js We note that there are some alternatives to define modules proposed by requirejs: Define a Module with Simplified CommonJS Wrapperhttp://requirejs.org/docs/api.html#cjsmodule and Define a Module as a Functionhttp://requirejs.org/docs/api.html#funcmodule, and we no found any other apparent reason that this: *If you wish to reuse some code that was written in the traditional CommonJS module format it May be Difficult to re-work to the array of dependencies used above, and you May prefer to Have direct alignment of dependency name to the local Variable used for that dependency *. Then, there is some particularity reason for you chose to use the Define a CommonJS Module with Simplified Wrapper way?, it's just a curiosity that can help us solve the intrigue =). Maybe for having a reason for var activity = require(sugar-web/activity/activity); ? 2013/11/1 Daniel Narvaez dwnarv...@gmail.com Yeah I think it make sense to mention it in the documentation, it's something every developer will run into. I'd suggest to try and keep our own documentation as short as possible and link out to the requirejs shim doc though, to avoid duplication and help maintenance. sounds good On Saturday, 2 November 2013, Code wrote: Thanks, Daniel! I'd rather use shim, too. I think it's a common need to have non-AMD dependencies when building an activity. What do you think about finding out a canonical way to achieve this and write it down in write your own activity doc? I'm willing to make a pull-request with the updated doc. Thanks again, Code On Fri, Nov 1, 2013 at 6:18 PM, Daniel Narvaez dwnarv...@gmail.comwrote: I think we have been suggesting to use the shim. Modifying loader.js should be fine, the template one shouldn't change often. On 1 November 2013 22:02, Code irag...@activitycentral.com wrote: Hello, list! I'd like to add a non-AMD lib (AngularJS in this case) to my activity. Here only points out how to add AMD ones: http://developer.sugarlabs.org/activity.md.html#using%20other%20javascript%20libraries Of course there are workarounds like adding script tags (I'd rather not) or setting up the shim option from RequireJS config... https://github.com/code-sur/web-activity-POC/blob/master/js/loader.js But it seems that I shouldn't be touching the loader.js file, isn't it? Is there a standard/preferred way to achieve this? Thanks, Code ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Daniel Narvaez -- Daniel Narvaez ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel Thanks! -- Roger Activity Central http://activitycentral.com/ -- Daniel Narvaez -- Roger Activity Central http
Re: [Sugar-devel] sugar-web - How to load non-AMD js modules / libs?
Thanks for answer! 2013/11/3 Daniel Narvaez dwnarv...@gmail.com Hi, As far as I know there is no good reason for that. Probably it was written when we wasn't very familiar with requirejs. I had already fixed one instance of this https://github.com/sugarlabs/sugar-web/commit/8c15d46ac5e6d2fe46db3588322ab2b92907987f On Sunday, 3 November 2013, Rogelio Mita wrote: a small intrigue was presented to us related to the way of defining the requirejs activity module: https://github.com/sugarlabs/sugar-web-template/blob/master/js/activity.js We note that there are some alternatives to define modules proposed by requirejs: Define a Module with Simplified CommonJS Wrapperhttp://requirejs.org/docs/api.html#cjsmodule and Define a Module as a Functionhttp://requirejs.org/docs/api.html#funcmodule, and we no found any other apparent reason that this: *If you wish to reuse some code that was written in the traditional CommonJS module format it May be Difficult to re-work to the array of dependencies used above, and you May prefer to Have direct alignment of dependency name to the local Variable used for that dependency *. Then, there is some particularity reason for you chose to use the Define a CommonJS Module with Simplified Wrapper way?, it's just a curiosity that can help us solve the intrigue =). Maybe for having a reason for var activity = require(sugar-web/activity/activity); ? 2013/11/1 Daniel Narvaez dwnarv...@gmail.com Yeah I think it make sense to mention it in the documentation, it's something every developer will run into. I'd suggest to try and keep our own documentation as short as possible and link out to the requirejs shim doc though, to avoid duplication and help maintenance. sounds good On Saturday, 2 November 2013, Code wrote: Thanks, Daniel! I'd rather use shim, too. I think it's a common need to have non-AMD dependencies when building an activity. What do you think about finding out a canonical way to achieve this and write it down in write your own activity doc? I'm willing to make a pull-request with the updated doc. Thanks again, Code On Fri, Nov 1, 2013 at 6:18 PM, Daniel Narvaez dwnarv...@gmail.comwrote: I think we have been suggesting to use the shim. Modifying loader.js should be fine, the template one shouldn't change often. On 1 November 2013 22:02, Code irag...@activitycentral.com wrote: Hello, list! I'd like to add a non-AMD lib (AngularJS in this case) to my activity. Here only points out how to add AMD ones: http://developer.sugarlabs.org/activity.md.html#using%20other%20javascript%20libraries Of course there are workarounds like adding script tags (I'd rather not) or setting up the shim option from RequireJS config... https://github.com/code-sur/web-activity-POC/blob/master/js/loader.js But it seems that I shouldn't be touching the loader.js file, isn't it? Is there a standard/preferred way to achieve this? Thanks, Code ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Daniel Narvaez -- Daniel Narvaez ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel Thanks! -- Roger Activity Central http://activitycentral.com/ -- Daniel Narvaez -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] sugar-web - How to load non-AMD js modules / libs?
a small intrigue was presented to us related to the way of defining the requirejs activity module: https://github.com/sugarlabs/sugar-web-template/blob/master/js/activity.js We note that there are some alternatives to define modules proposed by requirejs: Define a Module with Simplified CommonJS Wrapperhttp://requirejs.org/docs/api.html#cjsmodule and Define a Module as a Functionhttp://requirejs.org/docs/api.html#funcmodule, and we no found any other apparent reason that this: *If you wish to reuse some code that was written in the traditional CommonJS module format it May be Difficult to re-work to the array of dependencies used above, and you May prefer to Have direct alignment of dependency name to the local Variable used for that dependency *. Then, there is some particularity reason for you chose to use the Define a CommonJS Module with Simplified Wrapper way?, it's just a curiosity that can help us solve the intrigue =). Maybe for having a reason for var activity = require(sugar-web/activity/activity); ? 2013/11/1 Daniel Narvaez dwnarv...@gmail.com Yeah I think it make sense to mention it in the documentation, it's something every developer will run into. I'd suggest to try and keep our own documentation as short as possible and link out to the requirejs shim doc though, to avoid duplication and help maintenance. sounds good On Saturday, 2 November 2013, Code wrote: Thanks, Daniel! I'd rather use shim, too. I think it's a common need to have non-AMD dependencies when building an activity. What do you think about finding out a canonical way to achieve this and write it down in write your own activity doc? I'm willing to make a pull-request with the updated doc. Thanks again, Code On Fri, Nov 1, 2013 at 6:18 PM, Daniel Narvaez dwnarv...@gmail.comwrote: I think we have been suggesting to use the shim. Modifying loader.js should be fine, the template one shouldn't change often. On 1 November 2013 22:02, Code irag...@activitycentral.com wrote: Hello, list! I'd like to add a non-AMD lib (AngularJS in this case) to my activity. Here only points out how to add AMD ones: http://developer.sugarlabs.org/activity.md.html#using%20other%20javascript%20libraries Of course there are workarounds like adding script tags (I'd rather not) or setting up the shim option from RequireJS config... https://github.com/code-sur/web-activity-POC/blob/master/js/loader.js But it seems that I shouldn't be touching the loader.js file, isn't it? Is there a standard/preferred way to achieve this? Thanks, Code ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Daniel Narvaez -- Daniel Narvaez ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel Thanks! -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] sugar-web - API for storing data
2013/10/28 Daniel Narvaez dwnarv...@gmail.com Hi, this thread was also marked as spam by gmail :/ I can think of two alternatives yes =/ me too !... * sugar-build, which you already tried. I'm pretty confident we can get it to work on your system but it might require some back and forward. * F20 Soas. See http://wiki.sugarlabs.org/go/Sugar_on_a_Stick/Beta . I've not tested it personally but it should work. And if it doesn't we really want to know it. +1, let's try this next week, and will send you the result On 24 October 2013 22:58, Code irag...@activitycentral.com wrote: Hello, list! I'm Ignacio Raguet (aka Code), a developer interested on web activities and I would like to help you. I have been testing the the Sugar HTML5 + JS framework by creating a proof of concept activity (https://github.com/code-sur/web-activity-POC). Now I'm heading to implement some activity state persistence in order to be able to resume from a journal entry... I will be happy to make some testing on it and give some feedback. To reduce confusion, is there an reference image or a set of RPMs on which I should base my work? After reading this article: http://wiki.sugarlabs.org/go/0.100/Testing;, I'm currently using a 13.2.0 image and installing rpms and sugar-build... I have had better results with the former approach and that's why my question. Thanks, Code ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Daniel Narvaez ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel Thanks -- Roger. ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Problems in building sugar from source
Try with ./osbuild build command before run shell. 2013/10/28 Sai Vineet saivinee...@gmail.com I followed the instructions at - http://developer.sugarlabs.org/dev-environment.md.html#setup%20a%20development%20environment . I cloned(git clone) , pulled(./osbuild pull), and then tried running the shell using - ./osbuild shell. Here's the output I get- svineet@svineet-desktop:~/code/sugar-build$ ./osbuild shell $ sudo broot run osbuild shell [sudo] password for svineet: You must create or download the build root first. ! Failed to run command shell I'm on ubuntu 12.04. What should I do now? I want to build sugar from source. ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Problems in building sugar from source
You say you did set use_broot to false and then build, but nothing happen?, You tried to clean and then build? I don't know what is happening, I send this information to the list to see if anyone else can help you, in any way you can try: set in prefs.json use_broot to false ./osbuild clean ./osbuild build 2013/10/28 Sai Vineet saivinee...@gmail.com Tried it. Still not working. Here's the output it gave me - svineet@svineet-desktop:~/code/sugar-build$ ./osbuild build $ sudo broot run osbuild build [sudo] password for svineet: You must create or download the build root first. ! Failed to run command build I have tried many alternatives - ./osbuild broot create - svineet@svineet-desktop:~/code/sugar-build$ ./osbuild broot create $ sudo broot create Traceback (most recent call last): File /home/svineet/code/sugar-build/build/out/sandbox-host/install/bin/broot, line 5, in module main.main() File /home/svineet/code/sugar-build/build/out/sandbox-host/install/local/lib/python2.7/site-packages/broot/main.py, line 49, in main result = root.create(options.arch, options.mirror) File /home/svineet/code/sugar-build/build/out/sandbox-host/install/local/lib/python2.7/site-packages/broot/root.py, line 200, in create self._builder.create(arch, mirror) File /home/svineet/code/sugar-build/build/out/sandbox-host/install/local/lib/python2.7/site-packages/broot/builder.py, line 85, in create check_call([rpm, --root, root_path, --initdb]) File /usr/lib/python2.7/subprocess.py, line 506, in check_call retcode = call(*popenargs, **kwargs) File /usr/lib/python2.7/subprocess.py, line 493, in call return Popen(*popenargs, **kwargs).wait() File /usr/lib/python2.7/subprocess.py, line 679, in __init__ errread, errwrite) File /usr/lib/python2.7/subprocess.py, line 1249, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory ! Failed to run command broot I also tried ./osbuild broot setup. It downloaded for a while. Then it printed a lot of text and then it told me thrice - You must create or download the build root first. What should I do? I repeat, the ./osbuild pull completed. I have done everything else required. I also tried setting prefs.json use_broot to false. I have removed all files and tried again, but in vain. I have been stuck here for 3 days. Please help Thank you On Mon, Oct 28, 2013 at 9:04 PM, Rogelio Mita rogeliom...@activitycentral.com wrote: Try with ./osbuild build command before run shell. 2013/10/28 Sai Vineet saivinee...@gmail.com I followed the instructions at - http://developer.sugarlabs.org/dev-environment.md.html#setup%20a%20development%20environment . I cloned(git clone) , pulled(./osbuild pull), and then tried running the shell using - ./osbuild shell. Here's the output I get- svineet@svineet-desktop:~/code/sugar-build$ ./osbuild shell $ sudo broot run osbuild shell [sudo] password for svineet: You must create or download the build root first. ! Failed to run command shell I'm on ubuntu 12.04. What should I do now? I want to build sugar from source. ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Roger Activity Central http://activitycentral.com/ -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Problems in building sugar from source
2013/10/28 Daniel Narvaez dwnarv...@gmail.com On 28 October 2013 19:03, Rogelio Mita rogeliom...@activitycentral.comwrote: set in prefs.json use_broot to false Please don't do that unless you know exactly what you are doing. It's likely it will work only on Fedora 19. thanks for the clarification -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] sugar-web - API for storing data
I am Rogelio Mita (Roger...) and I am in the same direction. Regards! 2013/10/24 Code irag...@activitycentral.com Hello, list! I'm Ignacio Raguet (aka Code), a developer interested on web activities and I would like to help you. I have been testing the the Sugar HTML5 + JS framework by creating a proof of concept activity (https://github.com/code-sur/web-activity-POC). Now I'm heading to implement some activity state persistence in order to be able to resume from a journal entry... I will be happy to make some testing on it and give some feedback. To reduce confusion, is there an reference image or a set of RPMs on which I should base my work? After reading this article: http://wiki.sugarlabs.org/go/0.100/Testing;, I'm currently using a 13.2.0 image and installing rpms and sugar-build... I have had better results with the former approach and that's why my question. Thanks, Code ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Roger Activity Central http://activitycentral.com/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel