nim-lang / nimble

Package manager for the Nim programming language.
https://nim-lang.github.io/nimble/index.html
Other
1.25k stars 191 forks source link

Error: undeclared identifier: 'name'. #237

Closed karantin2020 closed 8 years ago

karantin2020 commented 8 years ago

Changed zip.nimble file to

# Package

name          = "zip"
version       = "0.1.0"
author        = "Anonymous"
description   = "Wrapper for the zip library"
license       = "MIT"

# Dependencies

requires "nim >= 0.10.0"

task tests, "Run lib tests":
  withDir "tests":
    exec "nim c -r ziptests"

Got that error

FAILURE: Could not read package info file in .../zip/zip.nimble;
  Reading as ini file failed with: 
    Invalid section: .
  Evaluating as NimScript file failed with: 
    .../zip/zip.nimble(3, 1) Error: undeclared identifier: 'name'.

Without name field in nimble file everything works fine. Where can I write package name? Thanks

Araq commented 8 years ago

Don't write it at all, nimble knows the name already from the filename. There is pkgName too, but let's fight the boilerplate instead!