haXe to JS to haXe

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

haXe to JS to haXe

brett
Hi all-

I was talking with another developer today and he mentioned the scenario where an app is written in haXe targeting JS. Then another developer (at client?) who isn't familiar with haXe modifies the JS directly. Of course this change isn't reflected in the haXe code. Then if the haXe is modified, that change is overwritten.

My question is, how hard (or impossible) would it be to make write a pipeline to merge the changes back in to haXe code? Would having the ability to output JS with typing metadata included simplify this?

Brett
Reply | Threaded
Open this post in threaded view
|

Re: haXe to JS to haXe

Mihail Ivanchev
Hello,

This is called round-trip engineering; in the most cases it requires semantic models and will fairly complex to do. It's a large scientific area in applied computer science. The simplest thing would be to view the JS produced by haXe an artefact of no development value and just modify the haXe code. I'm sorry for this, but you gotta understand the huge complexity involved.

Cheers,
M. Ivanchev

On Mon, Oct 17, 2011 at 5:56 PM, brett <[hidden email]> wrote:
Hi all-

I was talking with another developer today and he mentioned the scenario
where an app is written in haXe targeting JS. Then another developer (at
client?) who isn't familiar with haXe modifies the JS directly. Of course
this change isn't reflected in the haXe code. Then if the haXe is modified,
that change is overwritten.

My question is, how hard (or impossible) would it be to make write a
pipeline to merge the changes back in to haXe code? Would having the ability
to output JS with typing metadata included simplify this?

Brett

--
View this message in context: http://haxe.1354130.n2.nabble.com/haXe-to-JS-to-haXe-tp6901123p6901123.html
Sent from the Haxe mailing list archive at Nabble.com.

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: haXe to JS to haXe

Juraj Kirchheim
+1 on that. Neither the effort to get this to work, nor the overhead
that needs to be encoded are worth the trouble.

I guess whatever the JS dev has modified can be put into a config,
that is shared between the haXe output and the vanilla JS. The config
can also contain function values, if more complex behavior should be
configurable.

On Mon, Oct 17, 2011 at 6:42 PM, Mihail Ivanchev <[hidden email]> wrote:

> Hello,
> This is called round-trip engineering; in the most cases it requires
> semantic models and will fairly complex to do. It's a large scientific area
> in applied computer science. The simplest thing would be to view the JS
> produced by haXe an artefact of no development value and just modify the
> haXe code. I'm sorry for this, but you gotta understand the huge complexity
> involved.
> Cheers,
> M. Ivanchev
>
> On Mon, Oct 17, 2011 at 5:56 PM, brett <[hidden email]>
> wrote:
>>
>> Hi all-
>>
>> I was talking with another developer today and he mentioned the scenario
>> where an app is written in haXe targeting JS. Then another developer (at
>> client?) who isn't familiar with haXe modifies the JS directly. Of course
>> this change isn't reflected in the haXe code. Then if the haXe is
>> modified,
>> that change is overwritten.
>>
>> My question is, how hard (or impossible) would it be to make write a
>> pipeline to merge the changes back in to haXe code? Would having the
>> ability
>> to output JS with typing metadata included simplify this?
>>
>> Brett
>>
>> --
>> View this message in context:
>> http://haxe.1354130.n2.nabble.com/haXe-to-JS-to-haXe-tp6901123p6901123.html
>> Sent from the Haxe mailing list archive at Nabble.com.
>>
>> --
>> haXe - an open source web programming language
>> http://haxe.org
>
>
> --
> haXe - an open source web programming language
> http://haxe.org
>

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: haXe to JS to haXe

Philipp Klose-2
In reply to this post by brett
I had the same problem with haXe generated PHP Script. The simplest way
is compare the files/folders with a suitable difftool, and port the
changes back. Recently I told my clients and add a warning to every
generated file that says, if they change the generated script I am not
responsible for any changes they have made and it's their job to do it
again.

On 17.10.2011 17:56, brett wrote:

> Hi all-
>
> I was talking with another developer today and he mentioned the scenario
> where an app is written in haXe targeting JS. Then another developer (at
> client?) who isn't familiar with haXe modifies the JS directly. Of course
> this change isn't reflected in the haXe code. Then if the haXe is modified,
> that change is overwritten.
>
> My question is, how hard (or impossible) would it be to make write a
> pipeline to merge the changes back in to haXe code? Would having the ability
> to output JS with typing metadata included simplify this?
>
> Brett
>
> --
> View this message in context: http://haxe.1354130.n2.nabble.com/haXe-to-JS-to-haXe-tp6901123p6901123.html
> Sent from the Haxe mailing list archive at Nabble.com.
>

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: haXe to JS to haXe

brett
In reply to this post by Mihail Ivanchev
Thanks for the feedback - I expected this to be the case, but wanted to confirm.

One other potential solution that I considered is that if their is a specific portion of the project which can be isolated on which the JS dev might work and that be included as an extern. Then, as long as the haXe facing API remained constant, it should continue working.