Giter Site home page Giter Site logo

parseini's People

Contributors

lihf8515 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

ajusa nimpacker

parseini's Issues

Erroneous quotations when adding new values to section

I like this parser - it works very nicely. I have this config file below that doesn't use quoted values. The config file on the left is the original one.

Screenshot from 2020-01-28 09-27-06

The code below adds the new keys

import parseini
var conf =  loadConfig("/tmp/sssd.conf")

conf.set("session_recording","scope","Some")
conf.set("session_recording","users","example,recording")

conf.write("/tmp/sssd.conf")

The added quoted values break the config file when sssd tries to reload it. Is there a way for the set proc to infer from the rest of config file if quotations are needed or maybe the proc should have a bool option to specify if the values shout be quoted?

Update code compatability with Nim v0.20.0

Greetings, thank you for the great module.

/home/akito/.nimble/pkgs/parseini-0.1.0/parseini.nim(582) loadConfig
/home/akito/.nimble/pkgs/parseini-0.1.0/parseini.nim(551) loadConfig
/home/akito/.nimble/pkgs/parseini-0.1.0/parseini.nim(463) next
/home/akito/.choosenim/toolchains/nim-0.20.0/lib/system/assign.nim(243) FieldDiscriminantCheck
/home/akito/.choosenim/toolchains/nim-0.20.0/lib/system/fatal.nim(39) sysFatal
Error: unhandled exception: assignment to discriminant changes object branch; compile with -d:nimOldCaseObjects for a transition period [FieldError]
Error: execution of an external program failed:

I got this error after upgrading to Nim v0.20.0, because case object branch transitions via system.reset are deprecated, which is mentioned here.

I hope there will be a fix available for this.
Thank you again, good job on the module.

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.