AtomicScala / atomic-scala-corrections

Find out about or report corrections for the book "Atomic Scala"
http://www.atomicscala.com
6 stars 2 forks source link

Scala Testing error #38

Open juliovg opened 8 years ago

juliovg commented 8 years ago

Hello everybody,

Looking the testing part (pag. 99), i got the next error:

julios-Mac-mini:testing juliovg$ scalac AtomicTest.scala julios-Mac-mini:testing juliovg$ scala prueba.scala /Users/juliovg/Documents/trabajo/Desarrollos/Scala/pruebas/testing/prueba.scala:5: error: object atomicscala is not a member of package com import com.atomicscala.AtomicTest._ ^ /Users/juliovg/Documents/trabajo/Desarrollos/Scala/pruebas/testing/prueba.scala:10: error: value is is not a member of Int v1 is 11 ^ /Users/juliovg/Documents/trabajo/Desarrollos/Scala/pruebas/testing/prueba.scala:11: error: value is is not a member of String v2 is "a String" ^ /Users/juliovg/Documents/trabajo/Desarrollos/Scala/pruebas/testing/prueba.scala:12: error: value is is not a member of String v2 is "Produces Error" ^ four errors found

You can see on the image the structure: https://openmerchantaccount.com/img2/scala-error.png

alt text

acearth commented 8 years ago

I faced the same question ..

BruceEckel commented 8 years ago

Is the directory containing 'com' in your CLASSPATH?

ghost commented 8 years ago

Hello,

I keep experiencing the same problem. The containing directory is on my classpath and i was able to run testall.sh. What could possibly be wrong?

ghost commented 7 years ago

Maybe the root cause is on the "fsc", fsc will reset when classpath change. You may reset it explicitly by execute the following

fsc -reset

Another way is to run the scala command without using the fsc offline compiler

scala -nc filename

0xpantera commented 7 years ago

Still no solution to this? I'm having the same error messages as @juliovg. Ran everything in the installation section without any problem, including ./testall.sh.

BruceEckel commented 7 years ago

Has everyone set their classpath correctly?

-- Bruce Eckel www.MindviewInc.com http://www.mindviewinc.com/ Blog: BruceEckel.github.io www.WinterTechForum.com www.AtomicScala.com www.Reinventing-Business.com http://www.TrustOrganizations.com http://www.ScalaSummit.com

On Mon, Jul 10, 2017 at 11:31 PM, Francisco Sosa notifications@github.com wrote:

Still no solution to this? I'm having the same error messages as @juliovg https://github.com/juliovg. Ran everything in the installation section without any problem, including ./testall.sh.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/AtomicScala/atomic-scala-corrections/issues/38#issuecomment-314327370, or mute the thread https://github.com/notifications/unsubscribe-auth/AA9JrL4O5NK3w1zdRJ4mKjyxCcCydEVvks5sMwi0gaJpZM4GnsLX .

0xpantera commented 7 years ago

@BruceEckel Is it necessary to set the classpath if running scalac AtomicTest.scala worked and created the subdirectory com\atomicscala with the .class files? Both the testall.ps1 on Windows and the ./testall.sh on Ubuntu 16.04 tested all the files.

0xpantera commented 7 years ago

@BruceEckel NVM I was being stubborn. Setting the CLASSPATH made it work.