Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

perf: survey, inspect and baseline load every dependency from source

オープン 初心者向け
#259 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
80/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
go
領域
performance

調査の方向性

cmd/declscope/load.go の loadPackages から始めて、analyzer が依存関係から facts または syntax を読み取るかどうかを確認してください。issue に記載されたコマンドと x/tools のサンプルバージョンを使い、packages.NeedDeps の有無による survey、baseline、inspect の出力を比較してください。依存関係モードを削除してもこれらの出力が変わらず、go test ./cmd/declscope/ が失敗しなければ完了です。

索引モデルが issue の本文から書いたものです。

説明

enhancement

loadPackages (cmd/declscope/load.go:44-46) asks for NeedDeps together with NeedSyntax and NeedTypesInfo. So go/packages parses and type-checks every dependency from source, the standard library included. shrink dropped NeedDeps on purpose: design/implementation.md:36 records 415 MB against 78 MB.

Measured in a scratch copy without NeedDeps

Run With NeedDeps Without it
survey -config .declscope-strict.yaml -format json ./... on declscope 1.0–1.1 s, 375 MB 0.8 s, 68 MB
baseline -shrink=false ./go/... on x/tools v0.52.0 2.26 s user, 690 MB 0.73 s user, 180 MB
survey -format json ./go/... on x/tools 645 MB 180 MB

The output was byte-identical in every case: the survey JSON, the baseline file (640 entries on x/tools) and inspect -format json ./internal. go test ./cmd/declscope/ passed.

Suggested fix

Remove packages.NeedDeps from the mode. First confirm that nothing in the analyzer depends on facts or syntax from dependencies.

主要言語
Go
スター
42
フォーク
1
平均マージ
1時間 18分
マージ済み PR(30日)
94

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

mpyw/declscope のほかの issue

mpyw/declscope の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。