exercism / configlet

The official tool for managing Exercism language track repositories.
https://exercism.org/docs/building/configlet
GNU Affero General Public License v3.0
21 stars 14 forks source link

sync: `configlet sync --update` raised `OSError` #384

Open axtens opened 3 years ago

axtens commented 3 years ago

In WSL under Windows 10. Transcript follows:

$ bin/configlet sync --update
Syncing exercises...
Cloning the problem-specifications repo into /mnt/c/Users/bugma/Dropbox/ExercismV3/vbnet/.problem-specifications...
[warn] all-your-base: missing 21 test cases
The following test case is missing:
{
  "uuid": "5ce422f9-7a4b-4f44-ad29-49c67cb32d2c",
  "description": "single bit one to decimal",
  "property": "rebase",
  "input": {
    "inputBase": 2,
    "digits": [
      1
    ],
    "outputBase": 10
  },
  "expected": [
    1
  ]
}

Do you want to include the test case ([y]es/[n]o/[s]kip)? y 

The following test case is missing:
{
  "uuid": "0cc3fea8-bb79-46ac-a2ab-5a2c93051033",
  "description": "binary to single decimal",
  "property": "rebase",
  "input": {
    "inputBase": 2,
    "digits": [
      1,
      0,
      1
    ],
    "outputBase": 10
  },
  "expected": [
    5
  ]
}

Do you want to include the test case ([y]es/[n]o/[s]kip)? y

The following test case is missing:
{
  "uuid": "f12db0f9-0d3d-42c2-b3ba-e38cb375a2b8",
  "description": "single decimal to binary",
  "property": "rebase",
  "input": {
    "inputBase": 10,
    "digits": [
      5
    ],
    "outputBase": 2
  },
  "expected": [
    1,
    0,
    1
  ]
}

Do you want to include the test case ([y]es/[n]o/[s]kip)? y

The following test case is missing:
{
  "uuid": "2c45cf54-6da3-4748-9733-5a3c765d925b",
  "description": "binary to multiple decimal",
  "property": "rebase",
  "input": {
    "inputBase": 2,
    "digits": [
      1,
      0,
      1,
      0,
      1,
      0
    ],
    "outputBase": 10
  },
  "expected": [
    4,
    2
  ]
}

Do you want to include the test case ([y]es/[n]o/[s]kip)? y

The following test case is missing:
{
  "uuid": "65ddb8b4-8899-4fcc-8618-181b2cf0002d",
  "description": "decimal to binary",
  "property": "rebase",
  "input": {
    "inputBase": 10,
    "digits": [
      4,
      2
    ],
    "outputBase": 2
  },
  "expected": [
    1,
    0,
    1,
    0,
    1,
    0
  ]
}

Do you want to include the test case ([y]es/[n]o/[s]kip)? y

The following test case is missing:
{
  "uuid": "8d418419-02a7-4824-8b7a-352d33c6987e",
  "description": "trinary to hexadecimal",
  "property": "rebase",
  "input": {
    "inputBase": 3,
    "digits": [
      1,
      1,
      2,
      0
    ],
    "outputBase": 16
  },
  "expected": [
    2,
    10
  ]
}

Do you want to include the test case ([y]es/[n]o/[s]kip)? y

The following test case is missing:
{
  "uuid": "d3901c80-8190-41b9-bd86-38d988efa956",
  "description": "hexadecimal to trinary",
  "property": "rebase",
  "input": {
    "inputBase": 16,
    "digits": [
      2,
      10
    ],
    "outputBase": 3
  },
  "expected": [
    1,
    1,
    2,
    0
  ]
}

Do you want to include the test case ([y]es/[n]o/[s]kip)? y

The following test case is missing:
{
  "uuid": "5d42f85e-21ad-41bd-b9be-a3e8e4258bbf",
  "description": "15-bit integer",
  "property": "rebase",
  "input": {
    "inputBase": 97,
    "digits": [
      3,
      46,
      60
    ],
    "outputBase": 73
  },
  "expected": [
    6,
    10,
    45
  ]
}

Do you want to include the test case ([y]es/[n]o/[s]kip)? y

The following test case is missing:
{
  "uuid": "d68788f7-66dd-43f8-a543-f15b6d233f83",
  "description": "empty list",
  "property": "rebase",
  "input": {
    "inputBase": 2,
    "digits": [],
    "outputBase": 10
  },
  "expected": [
    0
  ]
}

Do you want to include the test case ([y]es/[n]o/[s]kip)? y

The following test case is missing:
{
  "uuid": "5e27e8da-5862-4c5f-b2a9-26c0382b6be7",
  "description": "single zero",
  "property": "rebase",
  "input": {
    "inputBase": 10,
    "digits": [
      0
    ],
    "outputBase": 2
  },
  "expected": [
    0
  ]
}

Do you want to include the test case ([y]es/[n]o/[s]kip)? y

The following test case is missing:
{
  "uuid": "2e1c2573-77e4-4b9c-8517-6c56c5bcfdf2",
  "description": "multiple zeros",
  "property": "rebase",
  "input": {
    "inputBase": 10,
    "digits": [
      0,
      0,
      0
    ],
    "outputBase": 2
  },
  "expected": [
    0
  ]
}

Do you want to include the test case ([y]es/[n]o/[s]kip)? y

The following test case is missing:
{
  "uuid": "3530cd9f-8d6d-43f5-bc6e-b30b1db9629b",
  "description": "leading zeros",
  "property": "rebase",
  "input": {
    "inputBase": 7,
    "digits": [
      0,
      6,
      0
    ],
    "outputBase": 10
  },
  "expected": [
    4,
    2
  ]
}

Do you want to include the test case ([y]es/[n]o/[s]kip)? y

The following test case is missing:
{
  "uuid": "a6b476a1-1901-4f2a-92c4-4d91917ae023",
  "description": "input base is one",
  "property": "rebase",
  "input": {
    "inputBase": 1,
    "digits": [
      0
    ],
    "outputBase": 10
  },
  "expected": {
    "error": "input base must be >= 2"
  }
}

Do you want to include the test case ([y]es/[n]o/[s]kip)? y

The following test case is missing:
{
  "uuid": "e21a693a-7a69-450b-b393-27415c26a016",
  "description": "input base is zero",
  "property": "rebase",
  "input": {
    "inputBase": 0,
    "digits": [],
    "outputBase": 10
  },
  "expected": {
    "error": "input base must be >= 2"
  }
}

Do you want to include the test case ([y]es/[n]o/[s]kip)? y

The following test case is missing:
{
  "uuid": "54a23be5-d99e-41cc-88e0-a650ffe5fcc2",
  "description": "input base is negative",
  "property": "rebase",
  "input": {
    "inputBase": -2,
    "digits": [
      1
    ],
    "outputBase": 10
  },
  "expected": {
    "error": "input base must be >= 2"
  }
}

Do you want to include the test case ([y]es/[n]o/[s]kip)? y

The following test case is missing:
{
  "uuid": "9eccf60c-dcc9-407b-95d8-c37b8be56bb6",
  "description": "negative digit",
  "property": "rebase",
  "input": {
    "inputBase": 2,
    "digits": [
      1,
      -1,
      1,
      0,
      1,
      0
    ],
    "outputBase": 10
  },
  "expected": {
    "error": "all digits must satisfy 0 <= d < input base"
  }
}

Do you want to include the test case ([y]es/[n]o/[s]kip)? y

The following test case is missing:
{
  "uuid": "232fa4a5-e761-4939-ba0c-ed046cd0676a",
  "description": "invalid positive digit",
  "property": "rebase",
  "input": {
    "inputBase": 2,
    "digits": [
      1,
      2,
      1,
      0,
      1,
      0
    ],
    "outputBase": 10
  },
  "expected": {
    "error": "all digits must satisfy 0 <= d < input base"
  }
}

Do you want to include the test case ([y]es/[n]o/[s]kip)? y

The following test case is missing:
{
  "uuid": "14238f95-45da-41dc-95ce-18f860b30ad3",
  "description": "output base is one",
  "property": "rebase",
  "input": {
    "inputBase": 2,
    "digits": [
      1,
      0,
      1,
      0,
      1,
      0
    ],
    "outputBase": 1
  },
  "expected": {
    "error": "output base must be >= 2"
  }
}

Do you want to include the test case ([y]es/[n]o/[s]kip)? y

The following test case is missing:
{
  "uuid": "73dac367-da5c-4a37-95fe-c87fad0a4047",
  "description": "output base is zero",
  "property": "rebase",
  "input": {
    "inputBase": 10,
    "digits": [
      7
    ],
    "outputBase": 0
  },
  "expected": {
    "error": "output base must be >= 2"
  }
}

Do you want to include the test case ([y]es/[n]o/[s]kip)? y

The following test case is missing:
{
  "uuid": "13f81f42-ff53-4e24-89d9-37603a48ebd9",
  "description": "output base is negative",
  "property": "rebase",
  "input": {
    "inputBase": 2,
    "digits": [
      1
    ],
    "outputBase": -7
  },
  "expected": {
    "error": "output base must be >= 2"
  }
}

Do you want to include the test case ([y]es/[n]o/[s]kip)? y

The following test case is missing:
{
  "uuid": "0e6c895d-8a5d-4868-a345-309d094cfe8d",
  "description": "both bases are negative",
  "property": "rebase",
  "input": {
    "inputBase": -2,
    "digits": [
      1
    ],
    "outputBase": -7
  },
  "expected": {
    "error": "input base must be >= 2"
  }
}

Do you want to include the test case ([y]es/[n]o/[s]kip)? y

[warn] leap: missing 9 test cases
The following test case is missing:
{
  "uuid": "6466b30d-519c-438e-935d-388224ab5223",
  "description": "year not divisible by 4 in common year",
  "property": "leapYear",
  "input": {
    "year": 2015
  },
  "expected": false
}

Do you want to include the test case ([y]es/[n]o/[s]kip)? y

The following test case is missing:
{
  "uuid": "ac227e82-ee82-4a09-9eb6-4f84331ffdb0",
  "description": "year divisible by 2, not divisible by 4 in common year",
  "property": "leapYear",
  "input": {
    "year": 1970
  },
  "expected": false
}

Do you want to include the test case ([y]es/[n]o/[s]kip)? y

The following test case is missing:
{
  "uuid": "4fe9b84c-8e65-489e-970b-856d60b8b78e",
  "description": "year divisible by 4, not divisible by 100 in leap year",
  "property": "leapYear",
  "input": {
    "year": 1996
  },
  "expected": true
}

Do you want to include the test case ([y]es/[n]o/[s]kip)? y

The following test case is missing:
{
  "uuid": "7fc6aed7-e63c-48f5-ae05-5fe182f60a5d",
  "description": "year divisible by 4 and 5 is still a leap year",
  "property": "leapYear",
  "input": {
    "year": 1960
  },
  "expected": true
}

Do you want to include the test case ([y]es/[n]o/[s]kip)? y

The following test case is missing:
{
  "uuid": "78a7848f-9667-4192-ae53-87b30c9a02dd",
  "description": "year divisible by 100, not divisible by 400 in common year",
  "property": "leapYear",
  "input": {
    "year": 2100
  },
  "expected": false
}

Do you want to include the test case ([y]es/[n]o/[s]kip)? y

The following test case is missing:
{
  "uuid": "9d70f938-537c-40a6-ba19-f50739ce8bac",
  "description": "year divisible by 100 but not by 3 is still not a leap year",
  "property": "leapYear",
  "input": {
    "year": 1900
  },
  "expected": false
}

Do you want to include the test case ([y]es/[n]o/[s]kip)? y

The following test case is missing:
{
  "uuid": "42ee56ad-d3e6-48f1-8e3f-c84078d916fc",
  "description": "year divisible by 400 is leap year",
  "property": "leapYear",
  "input": {
    "year": 2000
  },
  "expected": true
}

Do you want to include the test case ([y]es/[n]o/[s]kip)? y

The following test case is missing:
{
  "uuid": "57902c77-6fe9-40de-8302-587b5c27121e",
  "description": "year divisible by 400 but not by 125 is still a leap year",
  "property": "leapYear",
  "input": {
    "year": 2400
  },
  "expected": true
}

Do you want to include the test case ([y]es/[n]o/[s]kip)? y

The following test case is missing:
{
  "uuid": "c30331f6-f9f6-4881-ad38-8ca8c12520c1",
  "description": "year divisible by 200, not divisible by 400 in common year",
  "property": "leapYear",
  "input": {
    "year": 1800
  },
  "expected": false
}

Do you want to include the test case ([y]es/[n]o/[s]kip)? y

oserr.nim(94)            raiseOSError
Error: unhandled exception: Permission denied
Additional info: "/mnt/c/Users/bugma/Dropbox/ExercismV3/vbnet/.problem-specifications/.github/workflow-tests" [OSError]kflow-tests" [OSError]
ee7 commented 3 years ago

Thanks for the report. I'll investigate.

ee7 commented 3 years ago

I can't reproduce this.

The final y answers the prompt for the last test case in leap, so at that moment configlet tries to write to

/mnt/c/Users/bugma/Dropbox/ExercismV3/vbnet/exercises/practice/leap/.meta/tests.toml

So my first guess is that configlet doesn't have permission to write there on your machine. But it seems like configlet wrote successfully to

/mnt/c/Users/bugma/Dropbox/ExercismV3/vbnet/exercises/practice/all-your-base/.meta/tests.toml

And a problem writing the tests.toml doesn't match the error message:

Additional info: "/mnt/c/Users/bugma/Dropbox/ExercismV3/vbnet/.problem-specifications/.github/workflow-tests" [OSError]kflow-tests" [OSError]

I don't know why the error is talking about the problem-specifications repo, and why that location.


Questions:

  1. Was the tests.toml file for leap written as expected?
  2. While configlet was prompting, did you make any manual changes in the local problem-specifications repo or the local track repo?
  3. What happens if you run the same command again?
  4. Does configlet --version produce this output?
    4.0.0-alpha.22
axtens commented 3 years ago

Answers:

  1. I believe so.
  2. I don't think so.
  3. The last two times I ran it I was on my Ubuntu (Focal) laptop and it ran fine. When I encountered the error I was on my Windows laptop running WSL (Ubuntu Focal).
  4. Yes