AdaCore / AdaCore/gpr

gprconfig crashes with ENCODING_ERROR when environment variables contain non-ASCII characters

Open
#14 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ada
Stars
21
Forks
12
PR merge metrics
No merged PRs in 30d

Description

Description

gprconfig crashes with ADA.STRINGS.UTF_ENCODING.ENCODING_ERROR when Windows environment variables contain non-ASCII (UTF-8) characters.

Environment

  • OS: Windows 11 (or your version)
  • gprbuild version: 25.0.1
  • Alire version: 2.1.0

Steps to Reproduce

  1. Have a Windows environment variable with non-ASCII characters
    (e.g., OneDrive=C:\Users\user\OneDrive - Politécnica)
  2. Run any Alire/gprbuild command: alr clean or gprconfig --config ada

Expected Behavior

The command should execute normally, handling UTF-8 encoded paths.

Actual Behavior

Crash with stack trace:

Unrecoverable error in GPRconfig: raised ADA.STRINGS.UTF_ENCODING.ENCODING_ERROR : bad input at Item (50)

Workaround

Clearing the problematic environment variables before running:

set OneDrive=
set OneDriveCommercial=

Contributor guide

Open the contributing guide

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 with the gprconfig entry point using a Windows environment variable such as OneDrive containing non-ASCII characters, then reproduce with gprconfig --config ada or alr clean. Trace the reported ADA.STRINGS.UTF_ENCODING.ENCODING_ERROR and verify that commands complete normally without requiring the documented environment-variable workaround.

Written by the indexing model from the issue text.

Assessment

Domain
build-system, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.