guybedford / guybedford/chomp

Interpolation pattern modifiers

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

Nobody has claimed this yet.

Dominant language
Rust
Stars
168
Forks
8
PR merge metrics
No merged PRs in 30d

Description

In interpolation patterns, it could be useful to support a new modifier syntax for eg handling excludes in the target space:

dep = "./src/##.ts"
targets = "lib/##[~(index|module)].js"

where if a dependency resulted in the invalid target, it would be automatically ignored, and conversely if building a target in the exclude space, it wouldn't match the interpolation.

Ideally we should use some sensible existing pattern system.

#[name] has been talked about for named parameters in some interpolation use cases, perhaps we just disambiguate via syntax eg via #{name} for that instead.

Effectively this syntax just allows providing a custom pattern instead of the default of **/* to match. The hard part as always with interpolation is handling bi-directional mapping support.

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

No implementation file or test is named. Start by tracing the interpolation pattern handling and existing modifier syntax, then determine how dependency-to-target and target-to-dependency mappings are represented; done means the proposed exclusion patterns and any disambiguated named-parameter syntax work in both directions with tests.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.