Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Main.scala (OpenWhisk admin tool) contains MIT-licensed code from Scallop without attribution

Đang mở Phù hợp với người mới
#264 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
72/100
Loại issue
Tài liệu
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
scala
Lĩnh vực
cli, documentation

Hướng nghiên cứu

Bắt đầu với build/openwhisk/tools/admin/src/main/scala/org/apache/openwhisk/core/cli/Main.scala và so sánh printErr với ScallopConf.scala, các dòng 77-85, trong Scallop 3.3.2. Kiểm tra LICENSE ở cấp cao nhất và các issue liên quan #259 và #260. Được xem là hoàn tất khi thay thế phần triển khai đã sao chép và xóa nhận xét ghi công của nó, hoặc giữ lại phần triển khai đó cùng với thông báo MIT bắt buộc của Scallop và tham chiếu đến tệp.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

build/openwhisk/tools/admin/src/main/scala/org/apache/openwhisk/core/cli/Main.scala (vendored from Apache OpenWhisk, shipped in the 0.9.0-incubating-RC7 source release) contains code copied from Scallop, which is MIT-licensed:

  private def printErr(message: String): Unit = {
    //Taken from ScallopConf
    if (overrideColorOutput.value.getOrElse(System.console() != null)) {
      Console.err.println("[\u001b[31m%s\u001b[0m] Error: %s" format (printedName, message))
    } else {
      // no colors on output
      Console.err.println("[%s] Error: %s" format (printedName, message))
    }
  }

This is the default errorMessageHandler from Scallop 3.3.2 (the version the admin tool depends on), jvm/src/main/scala/org.rogach.scallop/ScallopConf.scala lines 77-85, minus the final sys.exit(1):

  errorMessageHandler = { message =>
    if (overrideColorOutput.value.getOrElse(System.console() != null)) {
      Console.err.println("[\u001b[31m%s\u001b[0m] Error: %s" format (printedName, message))
    } else {
      // no colors on output
      Console.err.println("[%s] Error: %s" format (printedName, message))
    }
    sys.exit(1)
  }

Scallop is licensed under the MIT License, Copyright (C) 2012 Platon Pronko and Chris Hodapp. MIT is Category A, so it can be included, but the MIT licence requires its copyright and permission notice to be kept with the copied code. Currently the file only carries the ASF header, and the top-level LICENSE does not mention Scallop.

Suggested fix, either:

  1. Rewrite printErr independently (it is a few lines of error printing), and drop the "Taken from ScallopConf" comment; or
  2. Keep it and add a LICENSE entry for Scallop (MIT, with its copyright line and licence text), noting the file it is used in.

The same code is in upstream Apache OpenWhisk (tools/admin/src/main/scala/org/apache/openwhisk/core/cli/Main.scala). Related: #259, #260.

Ngôn ngữ chính
Python
Star
576
Fork
29
Merge trung bình
3 giờ 26 phút
Pull request đã merge (30 ngày)
12

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của apache/openserverless

Tất cả issue của apache/openserverless

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.