-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
This could be an upstream issue with https://github.com/kowainik/tomland, but I don't know enough Haskell to verify this.
Steps to reproduce:
- Install the bootstrap version of
fpm
(fcb7f67 used) - Create new project and add any dependency without using an inline table
> fpm new example
> cd example
> echo "[dependencies.toml-f]\ngit = \"https://github.com/awvwgk/toml-f\"" >> fpm.toml
- Try to build the project with the dependency
> fpm build
# gfortran (for build/gfortran_debug/example/example.o build/gfortran_debug/example/example.mod)
# ar (for build/gfortran_debug/example/libexample.a)
ar: creating build/gfortran_debug/example/libexample.a
- Find the dependency not recognized
> tree build
build
└── gfortran_debug
└── example
├── example.mod
├── example.o
└── libexample.a
Presumed source of the error:
The following two TOML documents are equivalent, except
- uses an inline table for
dependencies.toml-f
[dependencies]
toml-f = { git = "https://github.com/awvwgk/toml-f" }
dependencies
is implicitly created
[dependencies.toml-f]
git = "https://github.com/awvwgk/toml-f"
Apparently, implicit tables are handled differently by the tomland
parser, but this implementation detail should not leak into fpm
Additional information:
Testing this with the Python toml
module:
>>> import toml
>>> table = toml.loads("[dependencies.toml-f]\ngit = \"https://github.com/awvwgk/toml-f\"")
>>> print(table)
{'dependencies': {'toml-f': {'git': 'https://github.com/awvwgk/toml-f'}}}
>>> print(toml.dumps(table))
[dependencies.toml-f]
git = "https://github.com/awvwgk/toml-f"
Metadata
Metadata
Assignees
Labels
No labels