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

A report with no path is printed with its title run into the dashes

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

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
86/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Lĩnh vực
cli

Hướng nghiên cứu

Bắt đầu trong src/Cli/Report.gren tại errorBarEnd, so sánh nhánh Just và các nhánh Nothing được mô tả trong issue. Tái hiện report không có path bằng lệnh gren make được cung cấp, sau đó xác minh rằng tiêu đề của nó được tách khỏi các dấu gạch ngang và câu về nền tảng không tương thích có chứa “platform”.

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

Mô tả

Found against: gren 0.6.6, gren-lang/compiler-node 5.0.0, node 22
Reproduction: https://github.com/gilramir/gren-bug-reports/tree/main/2026-09-17-report-title-dashes

Cli.Report.toString puts a space between the title and the dashes when the
report has a path, and none when it has no path, so every path-less report the
CLI prints (INCOMPATIBLE PACKAGE, PROBLEM INSTALLING PACKAGE, CANNOT FIND COMPATIBLE VERSION, ...) reads -- TITLE-----. The compiler's own reports have
the space.

header
printed -- INCOMPATIBLE PACKAGE--------------------------------------------------------
expected -- INCOMPATIBLE PACKAGE -------------------------------------------------------

Reproduction

A node application that lists gren-lang/browser:

{
 "type": "application",
 "platform": "node",
 "source-directories": ["src"],
 "gren-version": "0.6.6",
 "dependencies": {"direct": {"gren-lang/core": "7.4.2", "gren-lang/browser": "6.0.0"}, "indirect": {"gren-lang/url": "6.0.0"}}
}

src/Main.gren:

module Main exposing (main)

import Node

main = Node.defineSimpleProgram (\_ -> Node.endSimpleProgram (Node.startProgram {}))

Output:

$ gren make Main --output=/dev/null
-- INCOMPATIBLE PACKAGE--------------------------------------------------------

gren-lang/browser targets the browser platform.

However, the current project targets the node, which is not compatible.

Also: The report's second sentence also lacks a word: "targets the node" should be
"targets the node platform".

Cause

In src/Cli/Report.gren, the Just path branch of errorBarEnd writes
" " ++ makeDashes (5 + ...) ++ " " ++ pathStr, and the Nothing branch writes
makeDashes (4 + String.unitLength title) with no space.

Ngôn ngữ chính
JavaScript
Star
2
Fork
3
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

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

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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 gren-lang/compiler-node

Tất cả issue của gren-lang/compiler-node

Issue tương tự

Thêm issue về JavaScript

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.