euantorano / semver.nim

Semantic versioning parser for Nim.
BSD 3-Clause "New" or "Revised" License
19 stars 4 forks source link

install error (nimble v0.8.3) #2

Closed RokkuCode closed 7 years ago

RokkuCode commented 7 years ago

Installing your package with nimble 0.8.3 fails. Error:


       Info Hint: used config file '/opt/nimlang/nim/config/nim.cfg' [Conf]
       Tip: 2 messages have been suppressed, use --verbose to show them.
     Error: Traceback (most recent call last)
        ... nimble.nim(1073)         nimble
        ... nimble.nim(999)          doAction
        ... nimble.nim(606)          install
        ... nimble.nim(570)          downloadPkg
        ... download.nim(199)        doDownload
        ... download.nim(165)        verifyClone
        ... packageparser.nim(325)   getPkgInfo
        ... packageparser.nim(313)   getPkgInfoFromFile
        ... packageparser.nim(288)   readPackageInfo
        ... Could not read package info file in /tmp/nimble_27588/githubcom_euantoranosemvernim/semver.nimble;
        ...   Reading as ini file failed with:
        ...     Invalid section: .
        ...   Evaluating as NimScript file failed with:
        ...     tmp/nimble_27588/githubcom_euantoranosemvernim/semver.nimble(3, 1) Error: Error: ambiguous identifier: 'version' --use nimscriptapi.version or system.version.```
euantorano commented 7 years ago

Hi,

That's odd. I've just installed the package successfully on nimble 0.8.3:

PS C:\Users\euant> nimble install semver
    Prompt: semver not found in any local packages.json, check internet for updated packages? [y/N]
    Answer: y
Downloading Official package list
    Success Package list downloaded.
Downloading https://github.com/euantorano/semver.nim using git
   Warning: File 'common.nim' inside package 'semver' is outside of the permitted namespace, should be inside a directory named 'semver' but is in a directory named 'private' instead. This will be an error in the future.
      Hint: Rename the directory to 'semver' or prevent its installation by adding `skipDirs = @["private"]` to the .nimble file.
  Verifying dependencies for semver@1.0.0
 Installing semver@1.0.0
   Success: semver installed successfully.
PS C:\Users\euant> nimble -v
nimble v0.8.3 compiled at 2017-01-12 15:29:24

The version tag is a valid tag, so it sounds like this is a possible bug in Nimble. I've tagged @dom96 on IRC asking if he has any idea what the problem could be.

RokkuCode commented 7 years ago

Hm, maybe this error occurs only on linux?

Cloning latest tagged version: v.1.0.2

are there differencies? because you installed 1.0.0?

euantorano commented 7 years ago

Strange, looks like Nimble on my Windows machine isn't seeing the 1.0.2 tag. I'm not entirely sure why that would be.

I'll need to test on a Linux machine, but I'm at work at the minute.

I wonder if part of the problem on Windows is my misspelling of v1.0.2 as v.1.0.2. I'll force push a tag for v1.0.2 after work.

euantorano commented 7 years ago

Just installed on OS X no problem too. Can you try installing again now that I've fixed the tag @pyloor?

RokkuCode commented 7 years ago

Hi, i tested it again


    Reading official package list
Downloading https://github.com/euantorano/semver.nim using git
    Cloning latest tagged version: v1.0.4
       Info Hint: used config file '/opt/nimlang/nim/config/nim.cfg' [Conf]
     Error: Traceback (most recent call last)
        ... nimble.nim(1073)         nimble
        ... nimble.nim(999)          doAction
        ... nimble.nim(606)          install
        ... nimble.nim(570)          downloadPkg
        ... download.nim(199)        doDownload
        ... download.nim(165)        verifyClone
        ... packageparser.nim(325)   getPkgInfo
        ... packageparser.nim(313)   getPkgInfoFromFile
        ... packageparser.nim(288)   readPackageInfo
        ... Could not read package info file in /tmp/nimble_1182/githubcom_euantoranosemvernim/semver.nimble;
        ...   Reading as ini file failed with:
        ...     Invalid section: .
        ...   Evaluating as NimScript file failed with:
        ...     tmp/nimble_1182/githubcom_euantoranosemvernim/semver.nimble(3, 1) Error: Error: ambiguous identifier: 'version' --use nimscriptapi.version or system.version.```

I will investigate this further what the problem is.
dom96 commented 7 years ago

This might help: https://github.com/nim-lang/nimble#troubleshooting

dom96 commented 7 years ago

In addition, make sure to remove /tmp/nimblepkg/

RokkuCode commented 7 years ago

I throwed anything away: nimble, tmp etc. After clean install now it works. It seems that something was messy. Consider the issue as resolved. Thanks for your help.