I am working on a prototype for a software system, which (at least at the start) will be closed source.
In order to save time, I'm thinking of using (that is, statically linking) a library that is licensed under GPLv3, so I can test my design quickly. If I distributed the software at this stage, I'd have to distribute source code along with it.
What if I don't, but satisfy myself that my system works, and then replace the GPL library with my own code before distributing? Would the result be "contaminated" by the GPL?
I have a feeling that retaining the GPL library in my Git history or not may make a difference.
Best Answer
The GPL writes:
So this condition only applies if your work is "based on" the library, which the licence defines as follows:
That is, your program is "based on" the library if and only if it is a derivative work according to copyright law. The legal definition of that term varies somewhat among jurisdictions, and usually does not directly address software. For instance, the US Copyright Act writes:
What this means for software must be interpreted by the courts, based on earlier similar rulings. I am not sufficiently familiar with the relevant case law in your jurisdiction to say with certainty how a court would decide your case. One could argue that "replacing the GPL library with own code" is an act of translation, particularly if your code is strongly inspired by the GPL implementation. Even reusing the API of the GPL library could land you in hot water (see Oracle vs. Google).
If the answer matters to you, I recommend seeking competent legal advice rather than asking strangers on the internet.