gprconfig crashes with ENCODING_ERROR when environment variables contain non-ASCII characters
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
- Have a Windows environment variable with non-ASCII characters
(e.g.,OneDrive=C:\Users\user\OneDrive - Politécnica) - Run any Alire/gprbuild command:
alr cleanorgprconfig --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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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