Skip to content

Fix file creation in quoted.QuoteCompiler #5487

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
merged 30 commits into from
Nov 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
72ef612
fix exception 'UnmappableCharacterException' in dottydoc on Windows
Nov 12, 2018
0f94c25
add batch scripts to build Dotty distro on Windows
Nov 12, 2018
36f6108
small improvements in batch scripts for Dotty 0.10
Nov 13, 2018
0717827
improved subcommands in build.bat
Nov 13, 2018
4e57388
move batch scripts for distro to correct directory
Nov 13, 2018
728cdff
fix goto label and help handling in batch scripts
Nov 13, 2018
52a4766
added batch scripts for sbt pack
Nov 13, 2018
89437fb
remove debug code
Nov 14, 2018
d30ef54
Merge branch 'master' of https://github.com/lampepfl/dotty
Nov 14, 2018
3455189
improved error messages in batch scripts
michelou Nov 14, 2018
28b4c04
reverted commits up to 72ef612 (PR #5430)
michelou Nov 14, 2018
6688ea6
added batch scripts for a new PR
michelou Nov 14, 2018
205fab5
removed debug code from batch scripts
michelou Nov 14, 2018
a6df702
added compile subcommand to batch script
michelou Nov 14, 2018
6a06639
Fix path separator on Windows
michelou Nov 16, 2018
211ce5d
add -timer option, fix args subroutine
michelou Nov 16, 2018
c97b1fc
Merge remote-tracking branch 'upstream/master' into utf8-eol
michelou Nov 16, 2018
ceace56
Merge branch 'master' of https://github.com/lampepfl/dotty
michelou Nov 16, 2018
c46d803
merged from branch batch-files
michelou Nov 16, 2018
ef2ba09
Merge remote-tracking branch 'origin/fromtasty'
michelou Nov 16, 2018
cfdf69e
Merge remote-tracking branch 'origin/utf8-eol'
michelou Nov 16, 2018
ae3e368
2nd attempt (wrong merge operation ?)
michelou Nov 16, 2018
f58e122
Merge remote-tracking branch 'origin/utf8-eol'
michelou Nov 16, 2018
2abde99
Merge branch 'master' of https://github.com/lampepfl/dotty into url-file
michelou Nov 19, 2018
e42b72c
PR #5487
michelou Nov 21, 2018
ca111b0
removed files not belonging the branch `quoted`
michelou Nov 21, 2018
8232db1
reverted removal of Debug.scala
michelou Nov 21, 2018
b2c95db
attempt to resolve conficting files
michelou Nov 21, 2018
0ffcf56
applied suggested change
michelou Nov 22, 2018
da92591
applied suggested change
michelou Nov 22, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion compiler/src/dotty/tools/dotc/fromtasty/Debug.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import scala.util.control.NonFatal

import dotty.tools.io.Directory

import java.io.{File => JFile}
import java.nio.file.{Files, Paths}

object Debug {
Expand Down Expand Up @@ -65,7 +66,7 @@ object Debug {

private def insertClasspathInArgs(args: List[String], cp: String): List[String] = {
val (beforeCp, fromCp) = args.span(_ != "-classpath")
val classpath = fromCp.drop(1).headOption.fold(cp)(_ + ":" + cp)
val classpath = fromCp.drop(1).headOption.fold(cp)(_ + JFile.pathSeparator + cp)
"-classpath" :: classpath :: beforeCp ::: fromCp.drop(2)
}
}
4 changes: 2 additions & 2 deletions compiler/src/dotty/tools/dotc/quoted/QuoteCompiler.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import dotty.tools.dotc.transform.Staging
import dotty.tools.dotc.typer.FrontEnd
import dotty.tools.dotc.util.Positions.Position
import dotty.tools.dotc.util.SourceFile
import dotty.tools.io.{Path, PlainFile}
import dotty.tools.io.{Path, VirtualFile}

import scala.quoted.{Expr, Type}

Expand Down Expand Up @@ -67,7 +67,7 @@ class QuoteCompiler extends Compiler {
*/
private def inClass(expr: Expr[_])(implicit ctx: Context): Tree = {
val pos = Position(0)
val assocFile = new PlainFile(Path("<quote>"))
val assocFile = new VirtualFile("<quote>")

val cls = ctx.newCompleteClassSymbol(defn.RootClass, outputClassName, EmptyFlags,
defn.ObjectType :: Nil, newScope, coord = pos, assocFile = assocFile).entered.asClass
Expand Down