You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import "path"
a: path.IsAbs("/foo")
a: path.IsAbs("/foo", "unix")
b: path.Split("/a/b/c")
b: path.Split("/a/b/c", "unix")
c: path.Rel("/a/b/c", "/a/b")
d: path.Match("/a/b/c", "/a")
// Expected way to use
// e1: too many arguments in call to path.Match (have 3, want 2)
// e1: path.Match("foo.cue", "*.cue", "unix")
// so remove os...?
// cannot use "*.cue" as *"unix" | "windows" | "plan9" | "aix" | "android" | ...
// e2: path.Match("foo.cue", "*.cue")
// is this a constraint only?
// error in call to path.Match: runtime error: index out of range [2] with length 2
// e3: "foo.cue" & path.Match("*.cue", "unix")
Additional Context
It appears that there is a missing input parameter during the registration
The standard library function path.Match requires 3 parameters, but only
2 are currently declared. This causes valid usage of the function to
fail with the following error:
too many arguments in call to path.Match (have 3, want 2):
To fix this, the missing parameter declaration is added.
Fixes#3203.
Signed-off-by: Noam Dolovich <noam.tzvi.dolovich@gmail.com>
Change-Id: I6e645293f8e589ad1834e3c33ff7bffc2abb5aed
The standard library function path.Match requires 3 parameters, but only
2 are currently declared. This causes valid usage of the function to
fail with the following error:
too many arguments in call to path.Match (have 3, want 2):
To fix this, the missing parameter declaration is added.
Fixes#3203.
Signed-off-by: Noam Dolovich <noam.tzvi.dolovich@gmail.com>
Change-Id: I6e645293f8e589ad1834e3c33ff7bffc2abb5aed
The standard library function path.Match requires 3 parameters, but only
2 are currently declared. This causes valid usage of the function to
fail with the following error:
too many arguments in call to path.Match (have 3, want 2):
To fix this, the missing parameter declaration is added.
Fixes#3203.
Signed-off-by: Noam Dolovich <noam.tzvi.dolovich@gmail.com>
Change-Id: I6e645293f8e589ad1834e3c33ff7bffc2abb5aed
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1195888
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1196228
Reviewed-by: Paul Jolly <paul@myitcv.io>
What version of CUE are you using (
cue version
)?0.8.2 & 0.9.0-rc.1
Does this issue reproduce with the latest stable release?
yes, and the RC
What did you do?
https://cuelang.org/play/?id=pJ-fBYTb409#w=function&i=cue&f=eval&o=cue
Additional Context
It appears that there is a missing input parameter during the registration
https://github.com/cue-lang/cue/blob/master/pkg/path/pkg.go#L125
Been this way for 4 years, there are no tests for this function afaict
The text was updated successfully, but these errors were encountered: