haskell / haskell/cabal

Warning: [no-default-language] doesn't provide enough information

Open
#11,310 2 comments 0 reactions 0 assignees View on GitHub
cabal-install: cmd/build cabal-install: cmd/check Cabal: other type: enhancement
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

### Describe the bug
This warning shows up while cabal is processing multiple packages in parallel.

```
Preprocessing library for constraint-set-0.0.1...
Preprocessing library for ca-template-haskell-0.1.0...
Preprocessing library for sns-log-0.1.0...
Preprocessing library for ca-cron-0.0.1...
Configuring library for pmeta-0.0.1...
Configuring library for ca-geo-0.0.1...
Configuring library for data-version-0.0.1...
Configuring library for nss-storage-0.0.1...
Configuring library for ca-control-0.2.4...
Configuring library for ca-dns-0.1.0...
Warning: [no-default-language] Packages using 'cabal-version: >= 1.10' and
before 'cabal-version: 3.4' must specify the 'default-language' field for each
component (e.g. Haskell98 or Haskell2010). If a component uses different
languages in different modules then list the other ones in the
'other-languages' field.
Preprocessing library for pmeta-0.0.1...
Preprocessing library for data-version-0.0.1...
Configuring library for sourced-json-0.0.1...
Preprocessing library for ca-control-0.2.4...
Preprocessing library for nss-storage-0.0.1...
Preprocessing library for ca-dns-0.1.0...
Preprocessing library for ca-geo-0.0.1...
```

**I don't know which component, let alone which package, has triggered the warning.**

### To Reproduce
?

### Expected behavior

If the component missing a default language starts at line 45 of the relevant cabal file, I'd expect the above to look like:

```
Preprocessing library for constraint-set-0.0.1...
Preprocessing library for ca-template-haskell-0.1.0...
Preprocessing library for sns-log-0.1.0...
Preprocessing library for ca-cron-0.0.1...
Configuring library for pmeta-0.0.1...
Configuring library for ca-geo-0.0.1...
Configuring library for data-version-0.0.1...
Configuring library for nss-storage-0.0.1...
Configuring library for ca-control-0.2.4...
Configuring library for ca-dns-0.1.0...
/path/to/package.cabal:45: Warning: [no-default-language] for package:component
Packages using 'cabal-version: >= 1.10' and
before 'cabal-version: 3.4' must specify the 'default-language' field for each
component (e.g. Haskell98 or Haskell2010). If a component uses different
languages in different modules then list the other ones in the
'other-languages' field.
Preprocessing library for pmeta-0.0.1...
Preprocessing library for data-version-0.0.1...
Configuring library for sourced-json-0.0.1...
Preprocessing library for ca-control-0.2.4...
Preprocessing library for nss-storage-0.0.1...
Preprocessing library for ca-dns-0.1.0...
Preprocessing library for ca-geo-0.0.1...
```

### System information
- NixOS 25.05
- Cabal 3.12 and 3.16
- GHC 9.6.6

Contributor guide

Open the contributing guide

Research direction

The report names no source file, test, or reproducible command; begin by locating the [no-default-language] warning in Cabal's package-processing path. Reproduce it with parallel package processing, then verify that the warning identifies the package, component, and cabal-file line without disrupting the surrounding output.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.