I have code in a language and want to convert it automatically using a tool to another language. Is it considered a derivative work and should I follow the same license?
Does it matter if it is MIT license or GPL for instance?
Open Source Stack Exchange is a question and answer site for people organizing, marketing or licensing open source development projects. It only takes a minute to sign up.
Sign up to join this communityI have code in a language and want to convert it automatically using a tool to another language. Is it considered a derivative work and should I follow the same license?
Does it matter if it is MIT license or GPL for instance?
If you translate a project from one (programming) language to another by pure mechanical means, then you are creating a derivative work, but you are not vesting any (additional) copyright claims in the result.
Some examples of a translation by pure mechanical means are compiling source into binary format or transpiling between source formats. The common characteristic is that the process requires absolutely no creative effort from the person doing it.
This means that you can only do the translation if the license gives you the right to make derivative works and you are not allowed to change the license (as you have no copyright claim in the work, you have no standing to put license terms on it).
No, you stay bound by the license.
Porting code from one language to another is a derivative in a very similar manner than just taking the code and making modifications to it. As such you are bound by the original license.
It doesn't necessarily mean you need to use the same license, but you need to choose a license which fulfills all obligations put on you by the original license. Thus if the original license is GPL, you most likely want to choose GPL. However if it is a permissive one like MIT, you can virtually choose any, provided you abide by the requirement to display the original copyright.