Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error reporting of toml file does not specify the location of the error #1563

Open
2 tasks done
Joebeazelman opened this issue Feb 14, 2024 · 3 comments
Open
2 tasks done
Labels
type: enhancement Improvements to existing functionality

Comments

@Joebeazelman
Copy link

Joebeazelman commented Feb 14, 2024

If there's an issue with Alire.toml, Alire doesn't report where the error occurs in the toml file.


error: Cannot continue without a workspace:
error:    Loading release from manifest: alire.toml:
error:    Failed to load alire.toml:
error:    dependency version must be a string

APPLICATION
alr version: 2.0-beta1
libalire version: 2.0-beta1
compilation date: 2023-10-19 15:15:43
compiled with version: 13.2.0

CONFIGURATION
config folder: /Users/joebeazelman/.config/alire
cache folder: /Users/joebeazelman/.cache/alire
vault folder: /Users/joebeazelman/.cache/alire/releases
build folder: /Users/joebeazelman/.cache/alire/builds
force flag: FALSE
non-interactive flag: FALSE
community index branch: stable-1.2.1
compatible index versions: ^1.1 & <=1.2.1
indexes folder: /Users/joebeazelman/.config/alire/indexes
indexes metadata: OK
index #1: (community) git+https://github.com/alire-project/alire-index#stable-1.2.1
toolchain folder: /Users/joebeazelman/.cache/alire/toolchains
toolchain assistant: disabled
tool #1 gnat: gnat_avr_elf=13.2.1
tool #2 gprbuild: gprbuild=22.0.1

WORKSPACE
root status: BROKEN
root release: N/A
root load error: Uninitialized Outcome
root folder: N/A
current folder: /Users/joebeazelman/Development/test_project

SYSTEM
distribution: HOMEBREW
host-arch: X86_64
os: MACOS
target: NATIVE
toolchain: USER
word-size: BITS_64

Checklist

  • I've included the output of alr version.
  • I've included complete steps to reproduce my issue.

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Run '...'
  3. See error

Expected Behavior
Describe what happened and how it deviates from what should have happened, if unclear from the previous steps.

alr version
Paste here the output of alr version.

alr logs
If pertinent, paste the output of alr -vv -d <your command> here.

@mosteo mosteo added the type: enhancement Improvements to existing functionality label Feb 15, 2024
@mosteo
Copy link
Member

mosteo commented Feb 15, 2024

Our TOML parser doesn't associate source lines to the parsed data structure, so there's no easy solution for the short term. We do get source positions when the TOML syntax is wrong.

@stcarrez
Copy link
Contributor

I made a PR on TOML for that pmderodat/ada-toml#14

@pmderodat
Copy link
Contributor

Hello! I’ve created a MR (pmderodat/ada-toml#15) to preserve source location information in TOML values: before I merge it to the master branch and create a new ada-toml release, would you be okay to have a look and give me some feedback, to make sure what I did is useful? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Improvements to existing functionality
Projects
None yet
Development

No branches or pull requests

4 participants