Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

License for Generated C++ with "Helper" Code #2485

Open
RespiteSage opened this issue Jan 31, 2024 · 0 comments
Open

License for Generated C++ with "Helper" Code #2485

RespiteSage opened this issue Jan 31, 2024 · 0 comments

Comments

@RespiteSage
Copy link

The quicktype documentation seems to indicate that it is an appropriate tool for generating code for commercial purposes, and I recall seeing somewhere that generated code is not considered derivative work (similarly to how the output of a compiler isn't considered derivative of the compiler). However, when generating C++ code with quicktype there are generally helper functions and/or classes generated alongside the "converted" data structures. Here's an example:

inline void CheckConstraint(const std::string& name, const ClassMemberConstraints& c, int64_t value)
{
    if (c.getMinIntValue() != boost::none && value < *c.getMinIntValue())
    {
        throw ValueTooLowException("Value too low for " + name + " (" + std::to_string(value) + "<" +
                                   std::to_string(*c.getMinIntValue()) + ")");
    }

    if (c.getMaxIntValue() != boost::none && value > *c.getMaxIntValue())
    {
        throw ValueTooHighException("Value too high for " + name + " (" + std::to_string(value) + ">" +
                                    std::to_string(*c.getMaxIntValue()) + ")");
    }
}

Crucially, these helper functions do not appear to be dependent on the input data at all, except to determine which subset of the entire helper "suite" is included.

Would you please add clarifying language somewhere to indicate whether these helper functions are considered derivative work of quicktype itself?

@RespiteSage RespiteSage changed the title Licensing Generated C++ with "Helper" Code License for Generated C++ with "Helper" Code Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant