You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by GitBox <gi...@apache.org> on 2021/03/18 13:09:10 UTC
[GitHub] [daffodil] scala-steward opened a new pull request #514: Update jansi to 2.3.2
scala-steward opened a new pull request #514:
URL: https://github.com/apache/daffodil/pull/514
Updates [org.fusesource.jansi:jansi](https://github.com/fusesource/jansi) from 1.18 to 2.3.2.
[Changelog](https://github.com/fusesource/jansi/blob/master/changelog.md)
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a [`.scala-steward.conf`](https://github.com/scala-steward-org/scala-steward/blob/6b50ebb3a65d208d859644421e7c591f58519186/docs/repo-specific-configuration.md) file.
Have a fantastic day writing Scala!
<details>
<summary>Ignore future updates</summary>
Add this to your `.scala-steward.conf` file to ignore future updates of this dependency:
```
updates.ignore = [ { groupId = "org.fusesource.jansi", artifactId = "jansi" } ]
```
</details>
labels: library-update
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [daffodil] stevedlawrence commented on a change in pull request #514: Update jansi to 2.3.2
Posted by GitBox <gi...@apache.org>.
stevedlawrence commented on a change in pull request #514:
URL: https://github.com/apache/daffodil/pull/514#discussion_r608079466
##########
File path: project/Dependencies.scala
##########
@@ -39,7 +38,8 @@ object Dependencies {
)
lazy val cli = Seq(
- "org.fusesource.jansi" % "jansi" % "1.18",
+ "org.jline" % "jline" % "3.19.0",
+ "org.fusesource.jansi" % "jansi" % "2.3.2",
"org.rogach" %% "scallop" % "4.0.2",
"net.sf.expectit" % "expectit-core" % "0.9.0" % "it,test"
)
Review comment:
Probably. I do like having test stuff at the bottom though, so it's more clear what is a test dep and what is a compile time dep. Maybe we should wait until all dep updates have been merged, since reordering things might cause some conflicts?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [daffodil] stevedlawrence commented on pull request #514: Update jansi to 2.3.2
Posted by GitBox <gi...@apache.org>.
stevedlawrence commented on pull request #514:
URL: https://github.com/apache/daffodil/pull/514#issuecomment-814276381
Did some investigation of Jline3, and I think things can be much much simpler. I pushed a fix up commit that changes how the completer logic works. I think this is significally more clear and lets Jline3 handle all of the parsing logic. Take a look at see if it seems reasonable.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [daffodil] stevedlawrence commented on pull request #514: Update jansi to 2.3.2
Posted by GitBox <gi...@apache.org>.
stevedlawrence commented on pull request #514:
URL: https://github.com/apache/daffodil/pull/514#issuecomment-801952942
Yeah, it's not clear what a dumb terminal is in widnows. We do use JLine's autocompletion capabilities, I wonder if that is considered "smart" and wouldn't be possible without jansi?
The jline readme does say:
>The big bundle includes everything (except jline-groovy) and is located at: jline/target/jline-${jline.version}.jar
So I think just be depending on jline we get the jline-terminal-jansi functionality, and I guess that finds jansi on the classath and enables things to make the terminal smart in windows? So maybe we are all good, but do need to should keep jansi and keep it updated.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [daffodil] stevedlawrence commented on pull request #514: Update jansi to 2.3.2
Posted by GitBox <gi...@apache.org>.
stevedlawrence commented on pull request #514:
URL: https://github.com/apache/daffodil/pull/514#issuecomment-814295024
I also noticed that jline was a core dependency. This is really only needed for the debugger, but it was used in daffodil-runtime2 for the completer. I just pushed a fixup commit that moves the new jline completer to the daffodil-cli project, so that this depenency can be a CLI only dependency. So now jansi and jline and their native capabilities are only ever used for the CLI and aren't pulled in when using maven.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [daffodil] tuxji commented on pull request #514: Update jansi to 2.3.2
Posted by GitBox <gi...@apache.org>.
tuxji commented on pull request #514:
URL: https://github.com/apache/daffodil/pull/514#issuecomment-811521107
I've replaced the JLine 2 calls with JLine 3 calls. The tests pass and my cursory tab completion testing with "daffodil -d parse ..." seems to indicate the JLine 3 calls work, but someone more accustomed to using JLine's completion and line editing functionality should verify manually that the JLine 3 calls produce the same behaviors as the JLine 2 calls in all respects.
- [X] **Do all automated continuous integration checks pass?**
Yes, they should pass.
- [ ] **Is the update a patch, minor, or major update?**
Major update for both JLine and jansi. Both had to be updated together and further manual testing needs to be done.
- [X] **Is the license still compatible with ASF License Policy?**
Yes, jansi is still Apache 2.0 and JLine is still BSD-3-Clause.
- [X] **Have any changes been made to LICENSE/NOTICE files that need to be incorporated?**
Yes. Updated bin.LICENSE with JLine 3's slight LICENSE changes.
- [X] **Have any transitive dependencies been added or changed?**
jansi has no transitive dependencies and JLine has only optional transitive dependencies (one of them is on jansi).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [daffodil] tuxji commented on a change in pull request #514: Update jansi to 2.3.2
Posted by GitBox <gi...@apache.org>.
tuxji commented on a change in pull request #514:
URL: https://github.com/apache/daffodil/pull/514#discussion_r607914250
##########
File path: daffodil-cli/src/it/scala/org/apache/daffodil/debugger/TestCLIDebugger.scala
##########
@@ -28,11 +28,9 @@ import org.apache.daffodil.CLI.Util
class TestCLIdebugger {
- val DAFFODIL_JAVA_OPTS = Map("DAFFODIL_JAVA_OPTS" -> "-Xms256m -Xmx2048m -Djline.terminal=jline.UnsupportedTerminal -Dfile.encoding=UTF-8")
- // Dubugging tests were not executing under Windows and especially under Eclipse
- // due to the use of a non-interactive console.
+ val DAFFODIL_JAVA_OPTS = Map("DAFFODIL_JAVA_OPTS" -> "-Xms256m -Xmx2048m -Dfile.encoding=UTF-8")
// Set the DAFFODIL_JAVA_OPTS environment variable for Debugger tests to specify
- // the use of an unsupported terminal: -Djline.terminal=jline.UnsupportedTerminal
+ // the use of a dumb terminal: -Dorg.jline.terminal.dumb
Review comment:
No, because I had a hunch that JLine 3 wouldn't need -Dorg.jline.terminal.dumb in DAFFODIL_JAVA_OPTS anyway. I noticed from my scanning of the JLine 3 sources that JLine 3 goes to some effort to pick the correct terminal implementation (including the dumb terminal) using the TERM environment variable and so on. I updated the comment to show how to specify the use of a dumb terminal in case we ever need to do it in the future, but we didn't need it to make the Debugger tests pass (although it's also true that the Debugger tests hit only a third of the JLine 3 code paths according to the coverage report).
##########
File path: daffodil-runtime1/src/main/scala/org/apache/daffodil/debugger/InteractiveDebugger.scala
##########
@@ -555,20 +558,15 @@ class InteractiveDebugger(runner: InteractiveDebuggerRunner, eCompilers: Express
if (args != "") {
if (dc == cmd) {
val completeString = getCompleteString(args)
- val subcandidates = new java.util.ArrayList[CharSequence]
- val newCursor = subcommandsCompleter.complete(completeString, cursor, subcandidates)
+ val subline = reader.getParser.parse(completeString, 0)
+ val subcandidates = new java.util.ArrayList[Candidate]
+ subcommandsCompleter.complete(reader, subline, subcandidates)
val seq = subcandidates.asScala
seq.foreach(c => candidates.add(c))
- buffer.lastIndexOf(completeString) + newCursor
- } else {
- -1
}
} else {
if (dc.name.startsWith(cmd)) {
- candidates.add(dc.name + " ")
- buffer.lastIndexOf(cmd)
- } else {
- -1
+ candidates.add(new Candidate(dc.name + " "))
Review comment:
Yes, we should remove that extra space. You're probably right that the original author of that code added the space to work around some issue with autocomplete that has since been fixed. I suspect that the subcandidate completion code below is causing the issue you noticed with main command completions sneaking into subcommands too.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [daffodil] stevedlawrence commented on pull request #514: Update jansi to 2.3.2
Posted by GitBox <gi...@apache.org>.
stevedlawrence commented on pull request #514:
URL: https://github.com/apache/daffodil/pull/514#issuecomment-814102189
Looking more at the line3 completer documentation, it says the ``complete`` function:
> Populates candidates with a list of possible completions for the buffer. The list of candidates will be sorted and filtered by the LineReader, so that the list of candidates displayed to the user will usually be smaller than the list given by the completer. Thus it is not necessary for the completer to do any matching based on the current buffer. On the contrary, in order for the typo matcher to work, all possible candidates for the word being completed should be returned.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [daffodil] stevedlawrence removed a comment on pull request #514: Update jansi to 2.3.2
Posted by GitBox <gi...@apache.org>.
stevedlawrence removed a comment on pull request #514:
URL: https://github.com/apache/daffodil/pull/514#issuecomment-814102189
Looking more at the line3 completer documentation, it says the ``complete`` function:
> Populates candidates with a list of possible completions for the buffer. The list of candidates will be sorted and filtered by the LineReader, so that the list of candidates displayed to the user will usually be smaller than the list given by the completer. Thus it is not necessary for the completer to do any matching based on the current buffer. On the contrary, in order for the typo matcher to work, all possible candidates for the word being completed should be returned.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [daffodil] tuxji commented on pull request #514: Update jansi to 2.3.2
Posted by GitBox <gi...@apache.org>.
tuxji commented on pull request #514:
URL: https://github.com/apache/daffodil/pull/514#issuecomment-801942643
I checked [JLine](https://github.com/jline/jline3)'s README. It says JLine's dependencies are minimal: we can use JLine without any dependencies on Unix systems, but in order to support Windows, we will need to add either Jansi or JNA. Further down, it says:
On the Windows platform, relying on native calls is mandatory, so you need to have either Jansi or JNA library in your classpath along with the jline-terminal-jansi or jline-terminal-jna jar. **Failing to do so will create a dumb terminal with no advanced capabilities.**
I can't see jline-terminal-jansi anywhere in Daffodil, so I think Daffodil has never used Jansi correctly. If you're fine with the Daffodil debugger acting like a dumb terminal with no advanced capabilities on Windows (I think that's what the above means), we can remove Jansi.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [daffodil] stevedlawrence commented on pull request #514: Update jansi to 2.3.2
Posted by GitBox <gi...@apache.org>.
stevedlawrence commented on pull request #514:
URL: https://github.com/apache/daffodil/pull/514#issuecomment-801928222
Actually, I'm wondering if we can just remove this jansi dependency entirely? I don't see any referenes to jansi in the code. The CLI seems to work fine with this dependency removed. All the CLI integration tests pass for me. And I don't think we use ANSI escape codes anywhere, which I think is the purpose of jansi.
Looks like this was added in commit 9c9b1a5dbd00ae488439a167b3c19c9acb1269ce which mentions issus with windows and eclipse? Maybe this solves some issue by just being on the classpath? From the readme of jansi, that doesn't sound like it's the case. Sounds like you have to use some Jansi function for this library to have an affect.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [daffodil] stevedlawrence closed pull request #514: Update jansi to 2.3.2
Posted by GitBox <gi...@apache.org>.
stevedlawrence closed pull request #514:
URL: https://github.com/apache/daffodil/pull/514
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [daffodil] stevedlawrence commented on a change in pull request #514: Update jansi to 2.3.2
Posted by GitBox <gi...@apache.org>.
stevedlawrence commented on a change in pull request #514:
URL: https://github.com/apache/daffodil/pull/514#discussion_r608082054
##########
File path: project/Dependencies.scala
##########
@@ -39,7 +38,8 @@ object Dependencies {
)
lazy val cli = Seq(
- "org.fusesource.jansi" % "jansi" % "1.18",
+ "org.jline" % "jline" % "3.19.0",
+ "org.fusesource.jansi" % "jansi" % "2.3.2",
"org.rogach" %% "scallop" % "4.0.2",
"net.sf.expectit" % "expectit-core" % "0.9.0" % "it,test"
)
Review comment:
Note, this one is fine, but reordering others might be best to hold off. Or at least just do those when their deps are updated.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [daffodil] mbeckerle commented on pull request #514: Update jansi to 2.3.2
Posted by GitBox <gi...@apache.org>.
mbeckerle commented on pull request #514:
URL: https://github.com/apache/daffodil/pull/514#issuecomment-813527232
I'm concerned about the comment
> "On the Windows platform, relying on **native calls is mandatory,** so you need to have either Jansi or JNA library in your classpath along with the jline-terminal-jansi or jline-terminal-jna jar. Failing to do so will create a dumb terminal with no advanced capabilities."
in the thread above. Specifically the term *native calls*.
Different dependencies for Windows/Unix bothers me quite a bit, particularly if we're including windows-specific code that calls native code.
Are my concerns sensible? I know that deep down, the JVM is making system calls and on Windows those may be different than on Linux. But the JVM itself is different than some dependent libraries to me.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [daffodil] stevedlawrence commented on pull request #514: Update jansi to 2.3.2
Posted by GitBox <gi...@apache.org>.
stevedlawrence commented on pull request #514:
URL: https://github.com/apache/daffodil/pull/514#issuecomment-814085902
From Mike:
> Different dependencies for Windows/Unix bothers me quite a bit, particularly if we're including windows-specific code that calls native code.
>
> Are my concerns sensible? I know that deep down, the JVM is making system calls and on Windows those may be different than on Linux. But the JVM itself is different than some dependent libraries to me.
I think it's sensible, but not sure what we can really do about it. Apparently windows needs special help to make terminals work that way we they should.
I think it's also worth pointing out that the jansi/jline dependencies are only dependencies to the CLI jar, and the CLI jar is only distributed in the rpm/zip/tars. If you use maven/sbt and depend on daffodil-japi or daffodil-sapi, the CLI and the jansi/jline dependencies are not pulled in.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [daffodil] stevedlawrence commented on a change in pull request #514: Update jansi to 2.3.2
Posted by GitBox <gi...@apache.org>.
stevedlawrence commented on a change in pull request #514:
URL: https://github.com/apache/daffodil/pull/514#discussion_r607801307
##########
File path: daffodil-runtime1/src/main/scala/org/apache/daffodil/debugger/InteractiveDebugger.scala
##########
@@ -555,20 +558,15 @@ class InteractiveDebugger(runner: InteractiveDebuggerRunner, eCompilers: Express
if (args != "") {
if (dc == cmd) {
val completeString = getCompleteString(args)
- val subcandidates = new java.util.ArrayList[CharSequence]
- val newCursor = subcommandsCompleter.complete(completeString, cursor, subcandidates)
+ val subline = reader.getParser.parse(completeString, 0)
+ val subcandidates = new java.util.ArrayList[Candidate]
+ subcommandsCompleter.complete(reader, subline, subcandidates)
val seq = subcandidates.asScala
seq.foreach(c => candidates.add(c))
- buffer.lastIndexOf(completeString) + newCursor
- } else {
- -1
}
} else {
if (dc.name.startsWith(cmd)) {
- candidates.add(dc.name + " ")
- buffer.lastIndexOf(cmd)
- } else {
- -1
+ candidates.add(new Candidate(dc.name + " "))
Review comment:
I wonder if adding this space is no longer correct? I'm not sure why it was added originally, but maybe it was to work around some issue with autocomplete that has since been fixed. I've tested removing this, e.g.:
```suggestion
candidates.add(new Candidate(dc.name))
```
And it does fix the issue with the escaped space.
##########
File path: daffodil-cli/src/it/scala/org/apache/daffodil/debugger/TestCLIDebugger.scala
##########
@@ -28,11 +28,9 @@ import org.apache.daffodil.CLI.Util
class TestCLIdebugger {
- val DAFFODIL_JAVA_OPTS = Map("DAFFODIL_JAVA_OPTS" -> "-Xms256m -Xmx2048m -Djline.terminal=jline.UnsupportedTerminal -Dfile.encoding=UTF-8")
- // Dubugging tests were not executing under Windows and especially under Eclipse
- // due to the use of a non-interactive console.
+ val DAFFODIL_JAVA_OPTS = Map("DAFFODIL_JAVA_OPTS" -> "-Xms256m -Xmx2048m -Dfile.encoding=UTF-8")
// Set the DAFFODIL_JAVA_OPTS environment variable for Debugger tests to specify
- // the use of an unsupported terminal: -Djline.terminal=jline.UnsupportedTerminal
+ // the use of a dumb terminal: -Dorg.jline.terminal.dumb
Review comment:
Should we be specigying terminal.dum in JAVA_OPTS above?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [daffodil] stevedlawrence commented on pull request #514: Update jansi to 2.3.2
Posted by GitBox <gi...@apache.org>.
stevedlawrence commented on pull request #514:
URL: https://github.com/apache/daffodil/pull/514#issuecomment-814076027
I took at look at there are some completion things that aren't quite right.
1. For commands that take subcommands (e.g. info, set, display, help), it autocmpletes with with I think an extra escaped space? For example, if you do ``in<TAB>`` it completes to ``info\ ``. Note that if you then immediately try to ``<TAB> ``, it then lists a some main debugger commands (but not all of them) rather than only listing the things you can get info about. I'm not sure what's causing that.
2. To avoid the above issue, if you do "info <TAB>" to list the things you can get info about, it appears to work, but it also includes some main commands (e.g. break, clear, quit, step). Same thing happens for the "set" command.
3. Some commands autocomplete with those main commands as well that shouldn't have any completions. For example ``condition <TAB>`` lists a bunch of main commands.
So I think there are two issues here (1) we are adding an escape space in a couple of instances (2) we are sometimes including some main commands in completion candidates when they shouldn't be.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [daffodil] stevedlawrence merged pull request #514: Update jansi to 2.3.2
Posted by GitBox <gi...@apache.org>.
stevedlawrence merged pull request #514:
URL: https://github.com/apache/daffodil/pull/514
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [daffodil] tuxji commented on pull request #514: Update jansi to 2.3.2
Posted by GitBox <gi...@apache.org>.
tuxji commented on pull request #514:
URL: https://github.com/apache/daffodil/pull/514#issuecomment-813597904
JLine 3 has a [README](https://github.com/jline/jline3#jansi-vs-jna) which goes into more detail. In short, JLine's TerminalBuilder will select its actual Terminal implementation based on the current operating system and whether you have either a Jansi or JNA library in your classpath. I'm not too concerned about the dependency on native calls since even sbt requires both JLine 3 and jansi 2 together in its [project/Dependencies.scala](https://github.com/sbt/sbt/blob/develop/project/Dependencies.scala).
However, I want someone who has used Daffodil's debugger REPL interface many times to verify with some manual testing that this upgrade from JLine 2 and jansi 1 to JLine 3 and jansi 2 hasn't changed Daffodil's terminal behavior in any unexpected way. The coverage report makes it clear that the CLI integration tests don't test the JLine code paths. My own manual testing seemed to work fine (tab completion, etc.) but I don't have much experience with Daffodil's debugger mode and the JLine editing key shortcuts. As long as someone like you does some manual testing before giving another +1, we should be fine.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [daffodil] tuxji commented on a change in pull request #514: Update jansi to 2.3.2
Posted by GitBox <gi...@apache.org>.
tuxji commented on a change in pull request #514:
URL: https://github.com/apache/daffodil/pull/514#discussion_r608066220
##########
File path: daffodil-cli/src/it/scala/org/apache/daffodil/debugger/TestCLIDebugger.scala
##########
@@ -28,11 +28,9 @@ import org.apache.daffodil.CLI.Util
class TestCLIdebugger {
- val DAFFODIL_JAVA_OPTS = Map("DAFFODIL_JAVA_OPTS" -> "-Xms256m -Xmx2048m -Djline.terminal=jline.UnsupportedTerminal -Dfile.encoding=UTF-8")
- // Dubugging tests were not executing under Windows and especially under Eclipse
- // due to the use of a non-interactive console.
+ val DAFFODIL_JAVA_OPTS = Map("DAFFODIL_JAVA_OPTS" -> "-Xms256m -Xmx2048m -Dfile.encoding=UTF-8")
// Set the DAFFODIL_JAVA_OPTS environment variable for Debugger tests to specify
- // the use of an unsupported terminal: -Djline.terminal=jline.UnsupportedTerminal
+ // the use of a dumb terminal: -Dorg.jline.terminal.dumb
Review comment:
If you're fine with the Debugger tests not hitting the CLIDebuggerCompleter, let's remove the comment above since the Debugger tests are passing on Windows and that means we don't need to mention -Dorg.jline.terminal.dumb at all.
##########
File path: project/Dependencies.scala
##########
@@ -39,7 +38,8 @@ object Dependencies {
)
lazy val cli = Seq(
- "org.fusesource.jansi" % "jansi" % "1.18",
+ "org.jline" % "jline" % "3.19.0",
+ "org.fusesource.jansi" % "jansi" % "2.3.2",
"org.rogach" %% "scallop" % "4.0.2",
"net.sf.expectit" % "expectit-core" % "0.9.0" % "it,test"
)
Review comment:
Should we sort the libs alphabetically in each block above?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [daffodil] stevedlawrence commented on a change in pull request #514: Update jansi to 2.3.2
Posted by GitBox <gi...@apache.org>.
stevedlawrence commented on a change in pull request #514:
URL: https://github.com/apache/daffodil/pull/514#discussion_r608081110
##########
File path: daffodil-cli/src/it/scala/org/apache/daffodil/debugger/TestCLIDebugger.scala
##########
@@ -28,11 +28,9 @@ import org.apache.daffodil.CLI.Util
class TestCLIdebugger {
- val DAFFODIL_JAVA_OPTS = Map("DAFFODIL_JAVA_OPTS" -> "-Xms256m -Xmx2048m -Djline.terminal=jline.UnsupportedTerminal -Dfile.encoding=UTF-8")
- // Dubugging tests were not executing under Windows and especially under Eclipse
- // due to the use of a non-interactive console.
+ val DAFFODIL_JAVA_OPTS = Map("DAFFODIL_JAVA_OPTS" -> "-Xms256m -Xmx2048m -Dfile.encoding=UTF-8")
// Set the DAFFODIL_JAVA_OPTS environment variable for Debugger tests to specify
- // the use of an unsupported terminal: -Djline.terminal=jline.UnsupportedTerminal
+ // the use of a dumb terminal: -Dorg.jline.terminal.dumb
Review comment:
I imagine the completer would be a pain to test with our current infrastrucutre. I'd rather just not worry about it. And I'll remove this entire comment, it doesn't really say anything helpful. I think the DAFFODIL_JAVA_OPTS is line is pretty clear what it's doing..
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [daffodil] tuxji commented on pull request #514: Update jansi to 2.3.2
Posted by GitBox <gi...@apache.org>.
tuxji commented on pull request #514:
URL: https://github.com/apache/daffodil/pull/514#issuecomment-806203865
JLine 3 has not only changed its package names, it also has changed some of its classes and their API in some ways. The Completer classes don't seem to changed their API much (the class names are still there, only in an impl package), but ConsoleReader has become LineReader in a different package with a somewhat different API for building and using it. The -Djline.terminal=jline.UnixTerminal and -Djline.terminal=jline.UnsupportedTerminal properties are gone and have no replacements in JLine 3 that I can see. Also, I saw a comment in a Fedora dev list saying recent Scala needs JLine 3.x (Rawhide has 2.x), JLine 3.x needs jansi 2.x (Rawhide has 1.x), and neither JLine nor jansi are backwards compatible with their previous major version.
Daffodil's use of the Completer classes should not be had to port, but its use of the ConsoleReader class looks like it will take some effort to port. No one seems to have written a guide how to migrate applications from JLine 2's ConsoleReader to JLine 3's LineReader (the closest I found so far was <https://groups.google.com/g/jline-users/c/ebQxEFUVkKs>). Probably the best way would be to compare JLine 2's [Example](https://github.com/jline/jline2/blob/master/src/test/java/jline/example/Example.java) class with JLine 3's [Example](https://github.com/jline/jline3/blob/master/builtins/src/test/java/org/jline/example/Example.java) class and go from there (also make sure you have the source code to look at too). If possible, can whoever originally wrote the Daffodil code using ConsoleReader port the code?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org