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

关于许可证问题及其解决办法 #28

Closed
fumiama opened this issue May 5, 2024 · 6 comments
Closed

关于许可证问题及其解决办法 #28

fumiama opened this issue May 5, 2024 · 6 comments

Comments

@fumiama
Copy link
Member

fumiama commented May 5, 2024

说明

注意到本项目有多处借鉴了 MiraiGo 的代码,现就此向贵方提出如下要求:

  1. 在 README 中注明此项目借鉴了 MiraiGo
  2. 在源代码中所有来源为 MiraiGo 的位置使用注释方式标明出处。
  • 例1:
    package proto
    import (
    "reflect"
    "google.golang.org/protobuf/types/known/anypb"
    "github.com/RomiChan/protobuf/proto"
    )
    // TODO: move to a new package
    const debug = false
    type Message = any
    func Marshal(m Message) ([]byte, error) {
    b, err := proto.Marshal(m)
    if err != nil {
    return b, err
    }
    if debug {
    t := reflect.TypeOf(m).Elem()
    n := reflect.New(t)
    err = Unmarshal(b, n.Interface())
    if err != nil {
    panic(err)
    }
    if reflect.DeepEqual(m, n) {
    panic("not equal")
    }
    }
    return b, err

    中,添加
    package proto
    
    // from https://github.com/Mrs4s/MiraiGo/blob/master/internal/proto/wrapper.go
    
    import (
        "reflect"
    
        "google.golang.org/protobuf/types/known/anypb"
    
        "github.com/RomiChan/protobuf/proto"
    )
    
    // TODO: move to a new package
    const debug = false
    
    ...
  • 例2:
    package client
    import (
    "reflect"
    "runtime/debug"
    "sync"
    "github.com/LagrangeDev/LagrangeGo/event"
    "github.com/LagrangeDev/LagrangeGo/message"
    "github.com/LagrangeDev/LagrangeGo/utils"
    )
    var eventLogger = utils.GetLogger("event")
    // protected all EventHandle, since write is very rare, use
    // only one lock to save memory
    var eventMu sync.RWMutex
    type EventHandle[T any] struct {
    // QQClient?
    handlers []func(client *QQClient, event T)
    }
    func (handle *EventHandle[T]) Subscribe(handler func(client *QQClient, event T)) {
    eventMu.Lock()
    defer eventMu.Unlock()
    // shrink the slice
    newHandlers := make([]func(client *QQClient, event T), len(handle.handlers)+1)
    copy(newHandlers, handle.handlers)
    newHandlers[len(handle.handlers)] = handler
    handle.handlers = newHandlers

    中,添加
    package client
    
    // from https://github.com/Mrs4s/MiraiGo/blob/master/client/events.go
    
    import (
        "reflect"
        "runtime/debug"
        "sync"
    
        "github.com/LagrangeDev/LagrangeGo/event"
        "github.com/LagrangeDev/LagrangeGo/message"
    
        "github.com/LagrangeDev/LagrangeGo/utils"
    )
    
    var eventLogger = utils.GetLogger("event")
  • 如果遇到一个文件中部分借鉴的情况,请分别在相应位置注明。
  1. 由于 MiraiGo 所使用的 GNU Affero General Public License v3.0 协议的传染性,贵方需要将此仓库协议从 GPLv3 变更为 AGPLv3。

其它解决方式

贵方也可选择完全删除仓库中与 MiraiGo 相同或相似的代码,这样便可不必执行上述要求。

@TheSnowfield
Copy link

TheSnowfield commented May 5, 2024

贵方也可选择完全删除仓库中与 MiraiGo 相同或相似的代码,这样便可不必执行上述要求。

換血重寫不合實際,淨室開發原則已經被破壞。目前來看比較好的做法是刪除,或者加上署名以及更換license。

@TheSnowfield
Copy link

  1. 在 README 中注明此项目借鉴了 MiraiGo

甚至連項目的readme都是一樣的格式

@Szzrain
Copy link
Collaborator

Szzrain commented May 5, 2024

原来如此,我就说这个项目里有些代码怎么看着有点奇怪,注明版权信息和更换License的事情还是由 @Redmomn 来处理吧

@Redmomn
Copy link
Collaborator

Redmomn commented May 5, 2024

感谢指正,抄代码不注明来源确实不对,非常抱歉,此issue和其他借鉴代码的部分将在今天内处理完成

@Redmomn Redmomn pinned this issue May 6, 2024
@Redmomn
Copy link
Collaborator

Redmomn commented May 6, 2024

#29 已经添加对MiraiGo及其他来源代码引用的声明,开源许可也换到了AGPLV3
这件事确实是我考虑不周了,任何参与贡献的开发者都应该被给予足够的尊重,各个项目之间的衍生关系不应该被抹去
我对MiraiGo的开发者及其他可能涉及的开发者表示衷心的歉意,我们也希望开源社区朝着更好的方向发展
另外这也是我第一次参与开源项目,如果有做的不对的地方,还请多多指正

@fumiama
Copy link
Member Author

fumiama commented May 6, 2024

感谢贵方负责任的态度,我已确实看到了仓库的更改,因此我将关闭此issue。希望与贵方一道,将开源精神保持并传承下去🤝

@fumiama fumiama closed this as completed May 6, 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

4 participants