scalameta / moped Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
Describe the bug
[info] error: found argument '--sourcegraph-endpoing' which wasn't expected, or isn't valid in this context.
[info] Did you mean '--app'?
Expected behavior
[info] error: found argument '--sourcegraph-endpoing' which wasn't expected, or isn't valid in this context.
- [info] Did you mean '--app'?
+ [info] Did you mean '--sourcegraph-endpoint'?
val x: Result[T] = ...
x.exists(???): Boolean
Describe the bug
It would be nice if there was a low-ceremony solution to have enum fields. For example,
sealed abstract class Day
case object Monday extends Day
case object Sunday extends Day
case class MyCommand(day: Day = Monday) extends Command
// --day=sunday works as expected
Currently, Moped doesn't work with Scala 3 because it uses the Scala 2 macro API to generate decoders. It should be possible to implement the same macros for Scala 3
Describe the bug
To Reproduce Steps to reproduce the behavior:
Define a command with an Int field port
case class PackageServer(
store: PackageStore = new InMemoryPackageStore,
port: Int = 8080,
Run the command with a custom port argument
[info] running (fork) com.sourcegraph.package_server.PackageServer --port 4040
[info] error: Type mismatch at '.port';
[info] found : String
[info] expected : Int
Expected behavior
It parses the port as 4040 instead of reporting an error.
To Reproduce Steps to reproduce the behavior:
❯ lsif-java --version
error: no such subcommand '--version'.
Did you mean 'lsif-java version'?
Try 'lsif-java help' for more information.
Expected behavior
❯ lsif-java --version
0.4.0
Describe the bug
Run moped app with flag --cwd PATH
and it reports that the flag is unknown.
Expected behavior
I expected the error message to say "Did you mean --app.cwd
?"
The workflow release.yml is referencing action actions/checkout using references v1. However this reference is missing the commit a6747255bd19d7a757dbdda8c654a9f84db19839 which may contain fix to the some vulnerability.
The vulnerability fix that is missing by actions version could be related to:
(1) CVE fix
(2) upgrade of vulnerable dependency
(3) fix to secret leak and others.
Please consider to update the reference to the action.
Describe the bug
The --no-
prefix is not discoverable.
To Reproduce Steps to reproduce the behavior:
Run --help
on a moped app with a cleanup: Boolean
field.
--cleanup: Boolean = true Whether to remove generated temporary files on exit.
Expected behavior
The help message should be something like this instead
--no-cleanup Whether to remove generated temporary files on exit.
The --cleanup
flag is enabled by default so maybe it's not necessary to include it in the output 🤔
❯ cat ~/.config/fish/functions/tests.fish
function _tests
set -l arguments (commandline -poc)
set -l current (commandline -ct)
tests complete fish $arguments $current 2> ~/.dump
end
complete -f -c tests -a "(_tests)"
moped on 🌱 start
❯ cat ~/.bash/complete/_tests
_tests() {
completions=$(tests complete bash ${#COMP_WORDS[@]} ${COMP_WORDS[@]} 2> ~/.dump)
cur="${COMP_WORDS[COMP_CWORD]}"
COMPREPLY=($(compgen -W "$completions" -- $cur))
return 0
}
complete -F _tests tests
moped on 🌱 start
❯ cat ~/.zsh/completion/_tests
#compdef _tests tests
function _tests {
compadd -- $(tests complete zsh $CURRENT $words[@] 2> /dev/null)
}
Describe the bug
I'm not able to declare a nested field within an Option[T]
To Reproduce Steps to reproduce the behavior:
case class MyCommand(
db: Option[Database] = None
)
case class Database(username: String)
Running --db.username=foo
fails
[info] error: found argument '--db.username' which wasn't expected, or isn't valid in this context.
Expected behavior
Running --db.username=foo
should work.
Describe the bug
Testkit currently uses Files.createTemporaryDirectory()
, which creates /var/file/...
paths on macOS that are mirrored under /private/var/file/...
and can cause tests to fail.
Expected behavior
I'm able to work around this issue with
override val temporaryDirectory: DirectoryFixture =
new DirectoryFixture {
private val path = BuildInfo.temporaryDirectory.toPath
override def apply(): Path = path
override def beforeAll(): Unit = {}
override def afterEach(context: AfterEach): Unit = {
DeleteVisitor.deleteRecursively(path)
}
}
it would be nice if there was an easy way to override the Files.createTemporaryDirectory()
method call.
❯ lsif-java index
java.util.concurrent.ExecutionException: Boxed Exception
at scala.concurrent.impl.Promise$.scala$concurrent$impl$Promise$$resolve(Promise.scala:99)
at scala.concurrent.impl.Promise$Transformation.handleFailure(Promise.scala:408)
at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:470)
at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1426)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: scala.NotImplementedError: an implementation is missing
at scala.Predef$.$qmark$qmark$qmark(Predef.scala:344)
at moped.json.PrimitiveBuilder.addObjectMember(JsonBuilder.scala:34)
at moped.json.ObjectMergerTraverser.traverseMember(ObjectMergerTraverser.scala:41)
at moped.json.JsonTraverser.$anonfun$traverseObject$1(JsonTraverser.scala:52)
at moped.json.JsonTraverser.$anonfun$traverseObject$1$adapted(JsonTraverser.scala:51)
at scala.collection.immutable.List.foreach(List.scala:333)
at moped.json.JsonTraverser.traverseObject(JsonTraverser.scala:51)
at moped.json.ObjectMergerTraverser.traverseObject(ObjectMergerTraverser.scala:37)
at moped.json.JsonTraverser.traverse(JsonTraverser.scala:12)
at moped.json.JsonTraverser.traverse(JsonTraverser.scala:4)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.