Skip to content

Environmentally friendly tests #1739

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

felixmulder
Copy link
Contributor

No description provided.

sbt adds the correct jars to classpath and the tests depend on
`packageAll` which creates these. When using something else however,
these together with `sbt-interfaces` do not get propagated from the
build.

To remedy this and make the testing a bit more flexible, we now
take these from `sys.props` instead, see `tests/dotty/Jars.scala`.

If the props aren't defined we fall back to the ones default to sbt.
-verbose output was suppressed like all other non-error
output in the tests. Now we don't filter output if -verbose is set.
val f = new JFile(getClass.getProtectionDomain.getCodeSource.getLocation.getPath)
println(f)
println(System.getProperty("java.class.path"))

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to self: get rid of this addition

|separated list of jars.
|
|When compiling with eclipse, you need the sbt-interfaces jar, but
|it in extras."""
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*put

Fengyun's original solution was the right one. We cannot NOT
enter a package class into its parent scope, because reloading
the denotation with .member will fail. So we need to enter it and
compensate by adding a clause to `qualifies` in `typedIdent`.

Weirdly, this was noted only when running tasty_bootstrap from
a custom classpath in the new build setup. So it was pretty
tricky to diagnose.
@felixmulder felixmulder force-pushed the topic/environmentally-friendly-tests branch from 781fb87 to 6d4a98c Compare November 24, 2016 08:44
@felixmulder
Copy link
Contributor Author

@smarter - would you mind reviewing?

Copy link
Member

@smarter smarter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

otherwise lgtm

| - DOTTY_INTERFACES
| - DOTTY_EXTRAS
|
|Where these all contain locations, except extras which is a comma
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

colon separated now

@felixmulder felixmulder force-pushed the topic/environmentally-friendly-tests branch from 6d4a98c to 2f1a794 Compare November 24, 2016 12:09
@felixmulder felixmulder merged commit 3599c24 into scala:master Nov 24, 2016
@allanrenucci allanrenucci deleted the topic/environmentally-friendly-tests branch December 14, 2017 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants