andry-tino / Rosetta

Toolset for migrating your codebase from C# to TypeScript
http://antino-enlad.cloudapp.net:8080/job/Rosetta/
GNU General Public License v3.0
24 stars 9 forks source link

Add logic for type namespace override #8

Closed andry-tino closed 7 years ago

andry-tino commented 7 years ago

Add a flag and logic in ScriptSharp definitions, in order to apply a new namespace to all types.

Performance

Performance are bad when going through the regular AST transformation for handling the [ScriptNamespace("NewNamespace")] script namespace:

image

Suggested approach

Create a new syntax transformer which renames all namespace into the one passed by the parameter. This will add complexity in memory consumption, but in terms of performance, it will be a much faster process compared to the current transformation algorithm.

andry-tino commented 7 years ago

The conditions that make this change necessary are not valid anymore. The targeted projects have types that should not fall into the overridden [ScriptNamespace("NewNamespace")] as it was assumed at the beginning of this task.