Comments (6)
Yeah i dunno. If you could provide a standalone non-psp repro that'd be great, or even a repro with psp but including any @load.ivy
commands necessary to pull psp into the classpath. Not the first time the presentation compiler has disappointed me ^_^
from ammonite.
This is really easy to reproduce, or more accurately, you can't help but reproduce it.
// build.sbt
libraryDependencies += "com.lihaoyi" %% "ammonite-repl" % "0.2.7"
initialCommands in console := "ammonite.repl.Repl.main(null)"
// a.scala
package p {
trait Direct[A] { def map[B](f: A => B): Direct[B] }
object Direct { def apply[A](xs: A*): Direct[A] = null }
}
// sbt console transcript
/**
@ 5.<tab> Display all 733 possibilities? (y or n)
@ Direct(5).map(_.<tab>
getClass ## asInstanceOf isInstanceOf toString
hashCode equals != == %
/ * - + ^
& | >= > <=
< >> >>> << unary_-
unary_+ unary_~ toDouble toFloat toLong
toInt toChar toShort toByte ensuring
x __resultOfEnsuring compareTo doubleValue floatValue
longValue intValue shortValue byteValue synchronized
ne eq wait notifyAll notify
→ -> __leftOfArrow self toOctalString
toHexString toBinaryString abs max min
to until isWhole ResultWithoutStep signum
underlying compare isValidChar isValidInt isValidShort
isValidByte formatted
Comes in under 733.
from ammonite.
Thanks!
Perhaps I can't help but reproduce it, but it's not always obvious when things which should be there are missing. Having concrete repro examples is always nice
from ammonite.
It's a blend of things which should be there missing, but more prominently in this example, things which should be absent being there. Unless Int has a, for instance, NoSuchFieldException member. The last few lines of completions on 5. are
Character UnsatisfiedLinkError InstantiationException
UnknownError ArrayStoreException VerifyError
StackTraceElement Deprecated Package
IllegalAccessException NoClassDefFoundError ClassFormatError
NoSuchMethodException Thread ClassValue
Void ClassCircularityError UnsupportedClassVersionError
FunctionalInterface Object SecurityException
ThreadDeath LinkageError Comparable
InstantiationError AssertionError IllegalStateException
RuntimePermission NoSuchMethodError
It's obviously every simple identifier being presented as Int members.
This may have no cause overlap at all with the Direct(Direct(1)).map(_.
example originally given, but when the bugs are this close to the surface it's best to handle some of them so as to see the potentially more interesting ones through less static.
from ammonite.
Maybe the problem fixed itself? This is what I'm seeing in trunk, and it looks about right
@ trait Direct[A] { def map[B](f: A => B): Direct[B] }; object Direct { def apply[A](xs: A*): Direct[A] = null }
defined trait Direct
defined object Direct
@ 5.
!= ## % & *
+ - -> / <
<< <= == > >=
>> >>> ResultWithoutStep ^ abs
asInstanceOf byteValue ceil compare compareTo
doubleValue ensuring eq equals floatValue
floor formatted getClass hashCode intValue
isInfinite isInfinity isInstanceOf isNaN isNegInfinity
isPosInfinity isValidByte isValidChar isValidInt isValidLong
isValidShort isWhole longValue max min
ne notify notifyAll round self
shortValue signum synchronized to toBinaryString
toByte toChar toDegrees toDouble toFloat
toHexString toInt toLong toOctalString toRadians
toShort toString unary_+ unary_- unary_~
underlying until wait | →
@ Direct(5).
!= ## + -> == asInstanceOf
ensuring eq equals formatted getClass hashCode
isInstanceOf map ne notify notifyAll synchronized
toString wait →
@ Direct(5).map(_.
!= ## % & *
+ - -> / <
<< <= == > >=
>> >>> ResultWithoutStep ^ abs
asInstanceOf byteValue ceil compare compareTo
doubleValue ensuring eq equals floatValue
floor formatted getClass hashCode intValue
isInfinite isInfinity isInstanceOf isNaN isNegInfinity
isPosInfinity isValidByte isValidChar isValidInt isValidLong
isValidShort isWhole longValue max min
ne notify notifyAll round self
shortValue signum synchronized to toBinaryString
toByte toChar toDegrees toDouble toFloat
toHexString toInt toLong toOctalString toRadians
toShort toString unary_+ unary_- unary_~
underlying until wait | →
@ Seq(Direct(5)).map(_.)
!= ## + -> == asInstanceOf
ensuring eq equals formatted getClass hashCode
isInstanceOf map ne notify notifyAll synchronized
toString wait →
from ammonite.
Probably need some more stuff from your repo for this to manifest, feel free to open with a self-contained example; otherwise I probably won't fix this until i bump into it myself
from ammonite.
Related Issues (20)
- Load jars from directory
- import $repo doesn't support the coursier repository short syntax
- java.lang.AssertionError: assertion failed when running Ammonite on Windows 10
- Handle SIGINT and exit repl
- Scala 3 import handling issue HOT 1
- Publish for Scala 2.12.18 and 2.13.11, please? HOT 4
- Scala 2.13 in Scripts by default HOT 2
- Run ut using Scala 2.13.10 on MacOS/Apple Silicon failed
- ammonite.session.ProjectTests.deeplearning should skip on `MacOS/Apple Silicon`
- Error loading ortools native library
- [bug] underscore import for a single `$ivy` dependncy fails (exact import works)
- Please publish for Scala 2.13.12 HOT 12
- Latest CI fails while releasing amm for Scala 2.13 HOT 5
- Use of deprecated `Thread.stop` prevents interruption on Java 20+ HOT 6
- Ammonite REPL cannot run on Java 21 HOT 2
- running tests failed unable to find utest
- not working in Windows, but found a workaround
- upickle.default.macroRW not working in Ammonite Repl 2.5.11 (Scala 3.2.2 Java 17.0.8.1)
- varargs in main causes errors
- unable to access package-private symbols from .sc files HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ammonite.