Skip to content

fpm tests fail if build against toml-f 0.3.1 instead of 0.2.4 #805

@band-a-prend

Description

@band-a-prend

Description

Step to reproduce for fpm-0.7.0 release or for fpm from commit-sha=58c7f76cecccf3062e870fab4e066c8719428ee9:

  1. Clone fpm repository:
    git clone https://github.com/fortran-lang/fpm.git
  2. If use previously cloned repo then delete the build directory: it could contains previously fetched toml-f-0.2.4 and then build process will use it instead of new version of toml-f.
  3. Update toml-f from 0.2.4 to 0.3.1 commit-sha:
    sed -i 's/e49f5523e4ee67db6628618864504448fb8c8939/aee54c5a480d623af99828c76df0447a15ce90dc/' fpm.toml
  4. Download bootstrap fpm:
    wget https://github.com/fortran-lang/fpm/releases/download/current/fpm.F90
  5. Build bootstrap executable:
mkdir -p build/bootstrap gfortran -J build/bootstrap -o build/bootstrap/fpm fpm.F90 
  1. Build fpm using bootstraped fpm:
    ./build/bootstrap/fpm build
  2. Run tests:
    ./build/bootstrap/fpm test
  3. Noticed that results (build with toml-f-0.3.1) differ from results when build with toml-f-0.2.4 ([EXPECTED FAIL]) and have errors ([FAILED]):
... # Starting invalid-toml ... (2/3) # ... invalid-toml [EXPECTED FAIL] # Message: error: Key 'dependencies' already exists --> fpm-invalid-toml.toml:4:2-13 | 3 | dependencies.fpm.git = "https://github.com/fortran-lang/fpm" | ------------ first defined here 4 | [dependencies] | ^^^^^^^^^^^^ key already used | ... # Starting package-simple ... (24/48) # ... package-simple [FAILED] # Message: manifest file syntax error: package name must be composed only of alphanumerics, "-" and "_" and start with a letter ::"example" ... # Starting package-wrongexe ... (28/48) # ... package-wrongexe [EXPECTED FAIL] # Message: manifest file syntax error: package name must be composed only of alphanumerics, "-" and "_" and start with a letter ::"example" # Starting package-wrongtest ... (29/48) # ... package-wrongtest [EXPECTED FAIL] # Message: manifest file syntax error: package name must be composed only of alphanumerics, "-" and "_" and start with a letter ::"example" # Starting package-duplicate ... (30/48) # ... package-duplicate [EXPECTED FAIL] # Message: manifest file syntax error: package name must be composed only of alphanumerics, "-" and "_" and start with a letter ::"example" # Starting test-simple ... (31/48) # ... test-simple [FAILED] # Message: manifest file syntax error: test name must be composed only of alphanumerics, "-" and "_" and start with a letter ::"example" ... # Starting example-simple ... (39/48) # ... example-simple [FAILED] # Message: manifest file syntax error: example name must be composed only of alphanumerics, "-" and "_" and start with a letter ::"example" ... 3 test(s) failed! ERROR STOP 1 Error termination. Backtrace: #0 0x7f2b24d7ea28 in ??? #1 0x7f2b24d7f674 in ??? #2 0x7f2b24d80e6e in ??? #3 0x5640c20c09f7 in fpm_testing at test/fpm_test/main.f90:67 #4 0x5640c20c0a57 in main at test/fpm_test/main.f90:5 ... <ERROR> Execution failed for object " fpm-test " <ERROR>*cmd_run*:stopping due to failed executions STOP 1 

The same tests if build with toml-f-0.2.4:

... # Starting invalid-toml ... (2/3) # ... invalid-toml [EXPECTED FAIL] # Message: line 4: Duplicate key (dependencies) found | [dependencies] |--------------^ ... # Starting package-simple ... (24/48) # ... package-simple [PASSED] ... # Starting package-wrongexe ... (28/48) # ... package-wrongexe [EXPECTED FAIL] # Message: Could not retrieve executable from array entry # Starting package-wrongtest ... (29/48) # ... package-wrongtest [EXPECTED FAIL] # Message: Could not retrieve test from array entry # Starting package-duplicate ... (30/48) # ... package-duplicate [EXPECTED FAIL] # Message: The program named 'prog' is duplicated. Unique program names are required. # Starting test-simple ... (31/48) # ... test-simple [PASSED] ... # Starting example-simple ... (39/48) # ... example-simple [PASSED] ... 

Expected Behaviour

All expected tests are passed and results are the same if build fpm against toml-0.2.4 and toml-0.3.1

Version of fpm

0.7.0, 58c7f76

Platform and Architecture

Gentoo Linux, amd64

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions