dogmatiq / dogmatiq/testkit

Check if removal of `MethodByName()` call can improve dead code elimination.

Open
#368 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
1
Forks
1
Avg merge
2m
Merged PRs (30d)
1

Description

See https://github.com/golang/protobuf/issues/1561

We use it here: https://github.com/dogmatiq/testkit/blob/f03ed614360ed189c44809ccafd139523d65cf3f/location/location.go#L115

It may not matter much since this code would generally only be used from test packages, but it'd be good to confirm that they are still eliminated properly. It's also not that uncommon to have some tests in the non-test package to test unexported functions, though this should be rare with Dogma applications.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with location/location.go at line 115 and the upstream golang/protobuf issue 1561. Compare builds with and without the MethodByName() call, including tests in the non-test package, and inspect whether the relevant code is eliminated; done means confirming the result and documenting or reporting any needed change.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
testing-qa
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.