Code Monkey home page Code Monkey logo

Comments (4)

LaurentRDC avatar LaurentRDC commented on June 17, 2024 1

Version 1.5.5 has just been released. It should fix your issue. Please give it a try and let me know how it goes.

from pandoc-plot.

LaurentRDC avatar LaurentRDC commented on June 17, 2024

Hi Ben,

Thank you for your bug report.

This is because the content of each script is hashed, and the hash determines the filename. This means that two scripts with the same content will be exported to the same file, as you pointed out.

The reason for this was to prevent pandoc-plot from re-generating plots on large documents. So if I change a single plot script in a 500 pages book, only 1 plot will be re-generated. If pandoc-plot added a randomly-generated string to every plot, then I would lose the 'caching' feature.

If you have N identical plot scripts (all with an identical hash value), then pandoc-plot could generate only 1 figure. Then, in the final document, you would have N links to the same file. Would that solution work for you?

from pandoc-plot.

LaurentRDC avatar LaurentRDC commented on June 17, 2024

I've opted for the crude fix for now: add a lock to file writing operations. Most of the time is spent rendering figures anyways, so this lock won't have much effect on performance.

Once the tests pass, including a new one replicating the issue you reported, I'll make a new release.

from pandoc-plot.

LaurentRDC avatar LaurentRDC commented on June 17, 2024

I'll close this for now, as version 1.5.5 should fix this issue. If not, please don't hesitate to re-open the issue.

from pandoc-plot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.