samber / samber/oops

Embed sources at compile time

Open
#7 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
990
Forks
45
Avg merge
5d 9h
Merged PRs (30d)
5

Description

It would be helpful to embed source code in binary, since the .Sources() getter read the sources at runtime, at location specified in the stack trace.

I don't see any developer-friendly way to do it, except by using an extra compilation step or codegen. 🙄

The best scenario would be to enable/disable it with a flag in the compilation line or with an environment variable.

Example:

OOPS_EMBED_SOURCES="none" // default
OOPS_EMBED_SOURCES="minimal"   // project
OOPS_EMBED_SOURCES="all"  // project + dependencies (very heavy!!)

Any idea ?

Contributor guide

No contributing guide indexed for this repository

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 by reviewing the .Sources() getter and how the library currently reads source locations from stack traces. Clarify the behavior for none, minimal, and all, then determine how compile-time or environment configuration should affect source availability without runtime files.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.