Coder Social home page Coder Social logo

Comments (6)

eddelbuettel avatar eddelbuettel commented on May 27, 2024 2

Agreed on both counts, and am as puzzled. I don't think the TOML parser does anything funky -- it just slurps a file. There should really be no side effects. Weird.

from rcpptoml.

schloerke avatar schloerke commented on May 27, 2024 1

I believe it's a windows only problem. Could not reproduce on mac. Could reproduce on windows VM.

What I find odd is that the file is not being touched, but parseToml is interpreting the file with CRLF after plumber is closed in windows when the file does not contain CRLF line endings.

from rcpptoml.

schloerke avatar schloerke commented on May 27, 2024

@hidjis and I found that RcppTOML::parseToml is behaving as if it's reading in a CRLF delimited file when the file is a LF file after a plumber router has been ran. If R is restarted, everything works as expected until the plumber router is $run().

There is no cpp code inside plumber.

Thank you for the help!
-Barret

from rcpptoml.

eddelbuettel avatar eddelbuettel commented on May 27, 2024

Hm. I am not really sure what you expect me to do here.

from rcpptoml.

eddelbuettel avatar eddelbuettel commented on May 27, 2024

Could this be a Windows thing? I can re-read the TOML after I Ctrl-C out of plumber:

R> RcppTOML::parseToml("tmp.toml")
List of 1
 $ database:List of 2
  ..$ host: chr "0.0.0.0"
  ..$ user: chr "toto"
R>
R> plumber::plumb("example.R")$run()
Starting server to listen on port 8971
Running the swagger UI at http://127.0.0.1:8971/__swagger__/
^C

R> RcppTOML::parseToml("tmp.toml")
List of 1
 $ database:List of 2
  ..$ host: chr "0.0.0.0"
  ..$ user: chr "toto"
R>

from rcpptoml.

eddelbuettel avatar eddelbuettel commented on May 27, 2024

Closing as stale.

from rcpptoml.

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.