GeertJohan / GeertJohan/go.rice

rice 2.0: move away from source parsing and use a Ricefile?

Open
#47 7 comments 2 reactions 0 assignees View on GitHub
2.0 ideas & design
Dominant language
Go
Stars
2.4k
Forks
185
PR merge metrics
No merged PRs in 30d

Description

"Rice **2.0**? But 1.0 hasn't even been released yet!?"
Correct. Please see #48 about that.

**Dropping .go file source parsing**
I've been thinking about this for a while now. The parsing of go source is a nice feature, but doesn't always work as expected:

```
const boxName = `someBox`
rice.FindBox(boxName) // will work in 'live' mode, but rice tool won't find this box so it isn't embedded/appended.
```

This can be solved by moving the configuration of boxes to a Ricefile; a config file in some human-readable format such as yaml. This also allows us to define more configuration parameters per box such as:
- strategy: embed vs append (embed one box, append the other).
- path different than box name

Ricefile should be located in main package for the binary, but can include boxes used in sub-packages.
Ricefile import other Ricefiles based on import path? This could make defining resources in packages a feasible reality.

This issue is a work in progress..

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the related issue #48 and the current go.rice source-parsing and rice-tool behavior. Then define the Ricefile format and how it handles box strategies, alternate paths, sub-package boxes, and imports between Ricefiles. Done means the proposed configuration approach is specified well enough to replace source parsing without unresolved design questions.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
build-system, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.