PreTeXtBook / pretext

PreTeXt: an authoring and publishing system for scholarly documents
https://pretextbook.org
Other
254 stars 205 forks source link

stringparam dictionary stores temporary info between tasks #2040

Closed oscarlevin closed 9 months ago

oscarlevin commented 9 months ago

For coordination with the CLI: we now automatically regenerate assets that have changed, by passing the xmlid of those assets to core's routines. However, since core's asset generation assigns the xmlid to a key on the stringparam dictionary, this stringparam is also used when trying to build, as the next step in the CLI's workflow.

To fix this, how about in each generate function, we first create a copy of the passed stringparam dictionary before adding things to that copy. Then use the copy everywhere in that function.

I'm happy to fix this up in a pull request, but let me know if I'm way off base, or there is an obvious way to make this better.

oscarlevin commented 9 months ago

I fixed this upstream by passing stringparams.copy() to the generate functions. So a change here is no longer needed.