haskell / haskell/cabal

Add CURRENT_PACKAGE_VERSION or similar to cabal-macros.h

Open
#4,319 1 comment 0 reactions 0 assignees View on GitHub
Cabal: cmd/build
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

Given that cabal-macros.h defines VERSION_[pkg] for every dep, it seems strange that we can't access something as simple as the current package version, unless of course I'm missing something.

I assume this would be a very easy and non-breaking change, and am happy to provide a PR. However there may be dragons, or it may already exist, so asking first!

Contributor guide

Open the contributing guide

Research direction

Start by inspecting cabal-macros.h and how its VERSION_[pkg] macros are defined. Confirm whether a current-package version macro already exists, then determine how to expose the requested value without breaking existing macros; done means the current package version is accessible through the header.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
build-system
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.