danstowell / Quarks2

sketch of new quarks implementation for supercollider
8 stars 3 forks source link

something wrong with the quark version check #5

Closed miguel-negrao closed 11 years ago

miguel-negrao commented 11 years ago

Doing Quarks2.install("Modality-toolkit") is checking out v0.1 in git instead of HEAD. It is naming the folder as Modality-toolkit-3.7-latest though...

WARNING: getQuarksInfo skipping 'cruciallib' from source 'sfsvn' because of nameclash with another quark
git clone 'https://github.com/ModalityTeam/Modality-toolkit.git' '/Users/miguelnegrao/Library/Application Support/SuperCollider/quarks_cupboard/Modality-toolkit-3.7-latest' && cd '/Users/miguelnegrao/Library/Application Support/SuperCollider/quarks_cupboard/Modality-toolkit-3.7-latest' && git checkout v0.1
ERROR: Unable to install quark: fetch already attempted, thus expecting a folder at '/Users/miguelnegrao/Library/Application Support/SuperCollider/quarks_cupboard/Modality-toolkit-3.7-latest'
CALL STACK:
    Exception:reportError   0x123d5b398
        arg this = <instance of Error>
    Nil:handleError   0x123b79308
        arg this = nil
        arg error = <instance of Error>
    Thread:handleError   0x1137b1b38
        arg this = <instance of Thread>
        arg error = <instance of Error>
    Object:throw   0x123d4ac48
        arg this = <instance of Error>
    Meta_Quarks2:install   0x123bba678
        arg this = <instance of Meta_Quarks2>
        arg name = "Modality-toolkit"
        arg scversion = nil
        arg quarkversion = nil
        var foldername = "Modality-toolkit-3.7-latest"
        var folderpath = "/Users/miguelnegrao/Library/..."
        var existing = nil
    Interpreter:interpretPrintCmdLine   0x123c7dd88
        arg this = <instance of Interpreter>
        var res = nil
        var func = <instance of Function>
        var code = "Quarks2.install("Modality-to..."
        var doc = nil
        var ideClass = <instance of Meta_ScIDE>
    Process:interpretPrintCmdLine   0x113625c48
        arg this = <instance of Main>
^^ The preceding error dump is for ERROR: Unable to install quark: fetch already attempted, thus expecting a folder at '/Users/miguelnegrao/Library/Application Support/SuperCollider/quarks_cupboard/Modality-toolkit-3.7-latest'
miguel-negrao commented 11 years ago

I think I got it:

While in "install" the quark version is not checked, in fetchQuark it is checked with pr_chooseBestVersion which returns Dictionary[ (compat -> [ 3.4, 3.5, 3.6, 3.7 ]), (fetchInfo -> v0.1), (version -> 0.1) ] . So if giving no "quarkversion" means "give me the latest" it should still return nil, instead of v0.1, should it not ?

I think it would be good if the latest version can also be entered manually in the yaml file so that the quark maintainer can specify the compatability of the latest version. If the latest version is only compatible with 3.6, and you are in on 3.5 you don't want to install the latest vesion, yet if giving no version info is supposed to mean that we want the latest it will cause the instalattion of an incompatible version. Perhaps we can allow for a version "latest" to be manually entered in the yaml file ? If it is not entered we assume latest is compatible with every sc version.

danstowell commented 11 years ago

Ah yes - the logic was flawed, thanks for pointing it out. Commit 46a31b8f87e7a9a2 should fix it. (If you can confirm, I'll close the issue.)

The quark maintainer can already specify the compatibility of the latest version. It simply goes in the root.

miguel-negrao commented 11 years ago

Ok, all is working good now ! Witness the firepower of this fully operational Quarks2 implementation ! ;-) WIll convert my yaml files version -> versions.