Mudlet / Mudlet

⚔️ A cross-platform, open source, and super fast MUD client with scripting in Lua
https://mudlet.org
GNU General Public License v2.0
715 stars 252 forks source link

Mudlet Discord library seems deprecated #4700

Open Kebap opened 3 years ago

Kebap commented 3 years ago

Brief summary of issue / Description of requested feature:

Move away from deprecated version, be able to receive upgrades from upstream

Steps to reproduce the issue / Reasons for adding feature:

@Faenriis commented in https://github.com/Mudlet/Mudlet/issues/3914#issuecomment-645004016

Bear in mind that discord-rpc-api which is currently used has been labeled as depriciated by upstream developers in favour of new Dicord GameSDK, so it's quite questionable for how long will current implementation in Mudlet work at all. On top of it, Mudlet uses upstream discord-rpc-api code as is, just bundles the upstream lib, no changes whatsoever, therefor it seems to me that this issue is something that ought to be directed to upstream (where no help will come, since code is depreciated).

Where @SlySven added:

I do not know much about the latter but I can speak about the former. it is available under a licence that is GPL compatible and thus can be included in the Mudlet package whereas the replacement (the Discord Games SDK) is proprietary and cannot. With the library being archived ( https://github.com/discord/discord-rpc/issues/290 ) it is now fixed and unchangeable - unless someone forks it and revises (or reverse engineers) it to connect to the Discord application (or applications as there are three current at any one time) via their own API. It is possible to re-compile the RPC library from the source code - but I found it hard to do and it had some dependencies that I found difficult to satisfy IIRC - on the other hand should a Mudlet user want to see the source code for the library it is there on https://github.com/discord/discord-rpc - so we should be able to meet our GPL obligations...

Error output / Expected result of feature

Move away from deprecated version, be able to receive upgrades from upstream

Extra information, such as Mudlet version, operating system and ideas for how to solve / implement:

vadi2 commented 3 years ago

I previously didn't it was possible to upgrade to the new SDK because of the licensing change, but thinking about it again - why can't we distribute the new proprietary library? The GPL doesn't prohibit distributing proprietary pieces in the final software, does it.

SlySven commented 3 years ago

https://github.com/discord/discord-rpc/issues/290#issuecomment-488847506

2.6 Open Source Software. Except as otherwise expressly agreed in writing, Developer shall not distribute via Discord Store, or combine any Discord materials with, open source or other software that is licensed under terms that purport to bind Discord to contractual obligations (e.g., the GNU General Public License or Lesser General Public License).

Sorry but this is not something that can be fixed.

SlySven commented 3 years ago

See here for other projects that did try to go to the newer SDK:

Kebap commented 3 years ago

The underlying discussion is there:

Some quote from Discord itself:

that is interesting. I'm gonna raise that with our legal council here. Thank you for pointing that out. As far as we're concerned, no, you don't need to distribute on our store to use the SDK. That's why it's available for download freely from the docs 😄

I don't think we should put "wontfix" on this because I am not a lawyer and maybe there is a way to solve this in the end.

How can we "distribute proprietary pieces in the final software" without invoking "terms that purport to bind Discord to contractual obligations" exactly?

Also, vote here to request clearer terms: https://support-dev.discord.com/hc/en-us/community/posts/360043633852-Improve-licensing-especially-for-FOSS-software

(Issue was previously discussed in our own team as #2770)

Also here are some relevant parts of GNU's own FAQ document:

SlySven commented 3 years ago

The terms on Discord's SDK prohibit - as far as anyone could make out in the GH repository for the RPC library - distribution within a GPLed product. It is not the GPL that says this but Discord's own licencing terms. Given that that GH repository has since been archived (locked and made read-only) - no further changes / discussions can be made there.

Also, vote here to request clearer terms: https://support-dev.discord.com/hc/en-us/community/posts/360043633852-Improve-licensing-especially-for-FOSS-software

That was posted May 2019 - and had not seen any activity since the one comment was made shortly thereafter.

SlySven commented 3 years ago

FTR I asked in the relevant Discord guild ("Official Unofficial API") and I think I had a reply from the person identified in the GH discussion as Lachee: image

SlySven commented 3 years ago

So, unless someone wants to take a look at that third party implementation and convert it from C# to C or C++ I am not sure we'd be any better off...

@vadi2 is this a wontfix (or rather cantfix) or not?

vadi2 commented 3 years ago

I think it's neither... reading links @Kebap provided, it seems it's entirely doable. We just grant an exception to Discord ourselves.

https://www.gnu.org/licenses/gpl-faq.html#FSWithNFLibs:

If you do this, your program won't be fully usable in a free environment. If your program depends on a nonfree library to do a certain job, it cannot do that job in the Free World. If it depends on a nonfree library to run at all, it cannot be part of a free operating system such as GNU; it is entirely off limits to the Free World.

We don't depend on it, Mudlet automatically works with it, so we are OK :+1:

f you want your program to link against a library not covered by the system library exception, you need to provide permission to do that. Below are two example license notices that you can use to do that; one for GPLv3, and the other for GPLv2. In either case, you should put this text in each file to which you are granting this permission.

Great, we'll just do that, grant the permission!

SlySven commented 3 years ago

I am sorry but you are missing the point - it is not the GPL that prevents us linking to the new SDK that Discord provides - it is Discord's own Terms & Conditions that prohibits the SDK being linked to a GPLed product. What allows us and others to use the RPC library is that Discord applied the MIT licence to that component.

vadi2 commented 3 years ago

I did miss it, yeah. But I can't the license neither on https://discord.com/developers/docs/game-sdk/sdk-starter-guide nor in the SDK. Where is it?

SlySven commented 3 years ago

Section 2.6 of: https://github.com/discord/discord-api-docs/blob/master/docs/Store_Distribution_Agreement.md - though it might seem to be talking about using the Discord Store - it also applies to the SDK.

What allows developers to bypass that is section 4.a on https://discord.com/developers/docs/legal :

Some of the software required by or included in our APIs may be offered under an open source license. Open source software licenses constitute separate written agreements. For certain APIs, open source software is listed in the documentation. To the limited extent the open source software license expressly supersedes the Terms, the open source license instead sets forth your agreement with Discord for the applicable open source software.

Kebap commented 3 years ago

Where is it?

It's in the store distribution agreement page, not the general legal page. Does that mean it only applies if you try to distribute through the store?

https://github.com/discordapp/discord-api-docs/blob/master/docs/Store_Distribution_Agreement.md

SlySven commented 3 years ago

If this agreement does not apply then remember there is no other licence/agreement (that has been found) - so there can not be any licence to use the Discord SDK at all (US default = "all rights reserved"):

2.6 Open Source Software. Except as otherwise expressly agreed in writing, Developer shall not distribute via Discord Store, or combine any Discord materials withwith, open source or other software that is licensed under terms that purport to bind Discord to contractual obligations (e.g., the GNU General Public License or Lesser General Public License).

Edit: redrawn to increase emphasis difference applied to text by deleting a clause that is not really relevant to our discussion and does not change the meaning of the remainder.