On Wed, Aug 15, 2012 at 6:17 AM, Billy Earney <[email protected]> wrote:
> ... ? the website examples are all force built with --enable-strict
>>
>> and a couple other flags for a number of reasons; i see this behavior
>> on Chrome still.
>>
>> all modules are force built to the same location, meaning:
>>
>> ../kitchensink/Logger.py
>> ../mail/Logger.py
>>
>> ... are in conflict.  KitchecnSink is built first, thus the Mail
>> version is never built ... and therefore is importing the wrong
>> module.  this is related to:
>>
> Shouldn't we allow modules to have the same name in the examples?  If not,
> how to propose that we fix it?   Should we give unique names to each module
> in the examples, or should we do something in the background with pyjs so it
> gives modules unique names when converting to javascript?

well the reason it's done this way is because --enable-compile-inplace
and --dynamic-link are currently incompatible with each other, and
it's super hard to fix without redoing much of the linking process
(which i've done in a local branch about 60%, but not complete).

basically it makes a 500MB+ difference in total size -- by translating
all examples to the same directory, they automatically share modules,
and it also cuts the build time town to a couple minutes from
something closer to an hour.

basically i'd like to see an __init__.py added to each example, and
then treated as a package importable from examples/, eg:

from helloworld import Hello
from regextextbox import RegexTextBox
[...]

... this should also make them much easier to consolidate because they
will essentially be part of the same application.  no need to do any
fancy rewriting/etc on the fly -- just think in terms of "example
packages" not "examples" :-)

-- 

C Anthony

-- 



Reply via email to