1

I have an Elixir project, I want to license the software under AGPLv3. The code have module attributes that's doc strings used to generate the documentation. Then, can the documentation (and then the doc string content only) be under CC-BY 4.0 in same time?

To add context:

  • Elixir is a programming language to run in Erlang virtual machine.
  • Doc string is a module value used to generate documentation, it's not a comment but it's in the code, but even the syntax is different than a comment.
  • With that module attributes other software like ExDoc can generate HTML documentation, for example.

To more context see Elixir module attributes where explain about doc annotation.

4
  • 2
    What is Elixir in this context? do you have links? Can you be more specific? what are the doc strings you are talking about? Code comments? Aug 27, 2017 at 15:04
  • 1
    Elixir is just a programing language for server applications. I guess doc strings are just pieces of the doc which are defined as value in the code.
    – Zimm i48
    Aug 28, 2017 at 11:59
  • Exactly @Zimmi48 the doc string is a string (different of a comment) that is compiled to module attribute and then ExDoc can use that modules attributes to generate HTML documentation automatically, and thats write in the code.
    – user5391
    Aug 28, 2017 at 22:21
  • @PhilippeOmbredanne I edit the question to add more context information and one link to understand about the doc annotation in Elixir language, it's even different syntax than comment and the comments are removed in the compilation, the doc is not removed and is used as module attribute in compilation. But it's only attribute data, not is code itself and not run itself. Maybe the official website can explain better about it than me.
    – user5391
    Aug 28, 2017 at 22:30

1 Answer 1

1

Elixir docstrings (which are similar to Python docstrings and JavaDoc comments) are part of the code. Having part of the code under a license and part of the code under another license is a rather complicated setup and this would mean further that two incompatible license co-exists in the same file which does not make sense to me.

You could release the whole generated documentation files under another license if you feel like it, but then anyone could regenerate that same documentation and the original code license would apply (e.g. AGPL).

My advice would be to keep things simple and since your documentation and code are combined, use a single license.

4
  • 3
    CC-BY 4.0 appears to be AGPL compatible; it is GPL compatible. I agree with you that this is a needlessly complex setup.
    – apsillers
    Aug 29, 2017 at 15:57
  • @apsillers the compatibility is to add CC-BY 4.0 content to software under GPL (or AGPL), I guessed that answer but the ideas was keep the code with AGPL but allow to use the knowledge from documentation content to make other works like books, because the AGPL is good for software but the knowledge from documentation content is not software itself. Then the idea was allow to anyone to write other documentation based in that knowledge.
    – user5391
    Aug 29, 2017 at 18:49
  • @JHG Ah, I didn't quite understand. I agree with Philippe (and I guess you do too, since you've accepted the answer!) -- license your complete generated documentation under CC BY; it achieves the same effect, and avoids the confusion of having multiple licenses apply to parts of the same file. You can dual-license your docs under the recipient's choice of AGPL / CC BY if you like.
    – apsillers
    Aug 29, 2017 at 19:02
  • @apsillers yes, I can do it now because the 100% of content is wrote by me, but if someone contribute then I can't also apply dual license to copyright of other person and I wouldn't like someone can apply CC-BY to source code, I see maybe it's difficult allow CC-BY only to knowledge of documentation to allow someone can write anything re-using it without an less strong software license (and I think for this project is better AGPL than other less strong). I guess anyone can write new work without re-use the documentation content. But I wanted first to check all possible choices.
    – user5391
    Aug 29, 2017 at 21:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.