riscv-software-src / riscv-isac

BSD 3-Clause "New" or "Revised" License
32 stars 55 forks source link

ruamel.yaml deprecated method and silent failing #91

Open benoitdenkinger opened 4 months ago

benoitdenkinger commented 4 months ago

riscv_isac package is not compatible with ruamel.yaml version > 0.18.0 (current latest version is 0.18.6) because of the deprecated method:

AttributeError: 
"round_trip_dump()" has been removed, use

  yaml = YAML()
  yaml.dump(...)

It could be nice to update the dependency on the ruamel.yaml version ruamel.yaml>=0.16.0,<=0.18.0

If this makes sense, I'll be happy to propose a PR

benoitdenkinger commented 4 months ago

Actually the version should be lower than 0.18.0, for some reason the output of round_trip_dump() method is different starting from 0.18.0 and the generated cgf file for each test is empty. The latest 0.17.40 version works for me.

As a side note, debugging this problem was really a nightmare as no error was triggered from this empty generated cgf file. I used riscv-isac from riscof (riscof coverage ...) and targets from the generated makefile were failing. Launching the targets on my own, they were failing but silently (so I thought everything was fine at first). Actually the Data Propagation Report and the Report File generation were not triggered because of the emtpy ref.cgf file. The makefile target somehow catches this problem (but without any relevant debug/error information) while running the command directly in the terminal didn't output any error.

allenjbaum commented 2 months ago

Hmm, this has been ignored a bit too long. please propose a PR.