[Sugar-devel] web-activity: env.getEnvironment dependency with Python code

Daniel Narvaez dwnarvaez at gmail.com
Thu Nov 28 13:26:52 EST 2013


Those are hard questions :) I was also thinking about compatibility with
old sugar-toolkit-gtk3 versions when we change stuff like getEnvironment.

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.

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..

We would need to figure out how to automate tests in a normal web browser,
but shouldn't be much of a problem.

On Wednesday, 27 November 2013, Rogelio Mita wrote:

> 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 10<https://github.com/sugarlabs/sugar-web/blob/master/env.js#L10>,
>     12 <https://github.com/sugarlabs/sugar-web/blob/master/env.js#L12>, 17<https://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 <gonzalo at laptop.org <javascript:_e({}, 'cvml',
> 'gonzalo at laptop.org');>>
>
>> Ok
>>
>>
>> On Wed, Nov 27, 2013 at 10:48 AM, Daniel Narvaez <dwnarvaez at gmail.com<javascript:_e({}, 'cvml', 'dwnarvaez at gmail.com');>
>> > wrote:
>>
>>> 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 <dwnarvaez at gmail.com>wrote:
>>>>
>>>>> 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 <
>>>>>> rogeliomita at activitycentral.com> wrote:
>>>>>>
>>>>>>>
>>>>>>> 2013/11/27 Daniel Narvaez <dwnarvaez at 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 at lists.sugarlabs.org
>>>>>>> http://lists.sugarlabs.org/listinfo/sugar-devel
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> Daniel Narvaez
>>>>>
>>>>>
>>>>
>>>
>>> --
>>> Daniel Narvaez
>>>
>>>
>>
>
>
> --
> Roger
>
> Activity Central <http://activitycentral.com/>
>


-- 
Daniel Narvaez
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20131128/67ad96ac/attachment.html>


More information about the Sugar-devel mailing list