j178 / leetgo

Best LeetCode friend for geek. :snowboarder:
MIT License
539 stars 32 forks source link

[Bug] Can't parse output of contest testcases #293

Closed rgbygv closed 2 months ago

rgbygv commented 7 months ago

leetgo debug

Leetgo version info :

1.4.5
commit: 19a7eb1ba0bc2a376043a1afb5ad4660b046dafe
built at: 2024-04-04T02:09:03Z
goos: windows
goarch: amd64

Home dir : C:\Users\admin.config\leetgo Project root : C:\Users\admin\leetcode Working dir : C:\Users\admin\leetcode Project config file : C:\Users\admin\leetcode\leetgo.yaml Project configuration:

author: 
language: en
code:
  lang: python
  python3:
    blocks:
    - name: beforeMarker
      template: |

        from bisect import bisect_left, bisect_right
        from collections import Counter, defaultdict, deque
        from copy import deepcopy
        from functools import cache, cmp_to_key, lru_cache, reduce
        from heapq import heapify, heappop, heappush, heappushpop, heapreplace
        from itertools import accumulate, chain, count, pairwise, zip_longest
        from math import ceil, comb, floor, gcd, inf, isqrt, log2, perm, sqrt
        from operator import xor
        from pprint import pprint
        from string import ascii_lowercase
        from typing import List, Optional
  rust:
  blocks:
    - name: beforeCode
      template: |
        use std::cmp::Reverse;
        use std::collections::*;
        use std::mem::swap;
leetcode:
  site: https://leetcode.cn
  credentials:
    from: browser # cookies
contest:
  open_in_browser: false
editor:
  use: custom
  command: "code"
  args: "{{.CodeFile}} {{.DescriptionFile}}"

Full configuration :

author: 
language: en
code:
  lang: python
  filename_template: '{{ .Id | padWithZero 4 }}{{ if .SlugIsMeaningful }}.{{ .Slug }}{{ end }}'
  separate_description_file: true
  blocks:
    - name: beforeCode
      template: |
        use std::cmp::Reverse;
        use std::collections::*;
        use std::mem::swap;
  modifiers:
    - name: removeUselessComments
  go:
    out_dir: go
    modifiers:
      - name: removeUselessComments
      - name: changeReceiverName
      - name: addNamedReturn
      - name: addMod
  python3:
    out_dir: python
    blocks:
      - name: beforeMarker
        template: |2
          from bisect import bisect_left, bisect_right
          from collections import Counter, defaultdict, deque
          from copy import deepcopy
          from functools import cache, cmp_to_key, lru_cache, reduce
          from heapq import heapify, heappop, heappush, heappushpop, heapreplace
          from itertools import accumulate, chain, count, pairwise, zip_longest
          from math import ceil, comb, floor, gcd, inf, isqrt, log2, perm, sqrt
          from operator import xor
          from pprint import pprint
          from string import ascii_lowercase
          from typing import List, Optional
    executable: python.exe
  cpp:
    out_dir: cpp
    cxx: g++
    cxxflags: -O2 -std=c++17
  rust:
    out_dir: rust
  java:
    out_dir: java
leetcode:
  site: https://leetcode.cn
  credentials:
    from: browser
    browsers: []
contest:
  out_dir: contest
  filename_template: '{{ .ContestShortSlug }}/{{ .Id }}{{ if .SlugIsMeaningful }}.{{ .Slug }}{{ end }}'
  open_in_browser: false
editor:
  use: custom
  command: code
  args: '{{.CodeFile}} {{.DescriptionFile}}'

Debug log

No response

Description

Here is the first question of contest w393, leetgo can't parse the output of contest. Maybe it happened because leetcode changed the description of contest problems, i first meet this problem in w389

question.md

**Example 1:**

**Input:** s = "1?:?4"

**Output:**"11:54"

**Explanation:** The latest 12-hour format time we can achieve by replacing `"?"` characters is
`"11:54"`.

**Example 2:**

**Input:** s = "0?:5?"

**Output:**"09:59"

**Explanation:** The latest 12-hour format time we can achieve by replacing `"?"` characters is
`"09:59"`.

testcases.txt

input:
"1?:?4"
output:

input:
"0?:5?"
output:
j178 commented 7 months ago

image They added another <span> before the output, leetgo currently can't handle this format, will investigate how to improve this.

rgbygv commented 2 months ago

It seems like version 1.4.9 fixed the issue, we don't have to see "output: skipped" anymore.