Skip to content

Fix #2184: Hyper Bootstrap! Integrate the backend as a git submodule #2260

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 1 commit into from
Apr 13, 2017

Conversation

smarter
Copy link
Member

@smarter smarter commented Apr 13, 2017

The backend lives in the scalac fork at
https://github.com/lampepfl/scala/tree/sharing-backend. Before this
commit, the scala-compiler built from this fork was a dependency of
Scala just to get this backend. This made it much more cumbersome to
test changes to the backend and also forced us to depend on Scala 2.11.5
since that is the version of scalac that the forked backend is based on.

This commit changes this by adding a git submodule in the
scala-backend directory that points to the scalac fork. We do not
compile the whole submodule, instead we add the subset of files we need
to the dotty-compiler project in the sbt build. See backend.md for more
information (online at
http://dotty.epfl.ch/docs/contributing/backend.html) once this commit is
merged.

The most important thing to note is that whenever you clone dotty you
should do git clone --recursive to also clone the submodule. If you
already have a cloned dotty you'll need to do:

git submodule update --init

You will need to repeat this command anytime you update dotty and the backend has been updated, otherwise the content of scala-backend will be stale.

@smarter smarter changed the title Fix #2184: Integrate the backend as a git submodule Fix #2184: Hyper Bootstrap! Integrate the backend as a git submodule Apr 13, 2017
Copy link
Contributor

@felixmulder felixmulder left a comment

Choose a reason for hiding this comment

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

Great to get this in!


``` shell
git submodule update
```
Copy link
Contributor

Choose a reason for hiding this comment

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

We could make sbt do this so that we never miss it - also helps beginners.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not a fan of doing more weird stuff with sbt, let's not do that for now.

scalaCompiler % Test,
"com.storm-enroute" %% "scalameter" % "0.6" % Test
),
libraryDependencies += "com.storm-enroute" %% "scalameter" % "0.6" % Test,
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this needed for?

Copy link
Member Author

Choose a reason for hiding this comment

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

It was already here before, no idea.

Copy link
Contributor

Choose a reason for hiding this comment

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

If we can we should kill it with 🔥

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, but removing/updating the bench project is a separate issue.

@@ -1187,7 +1187,7 @@ object TreeTransforms {
case NonFatal(ex) =>
if (tree ne crashingTree) {
crashingTree = tree
println(i"exception while transforming $tree of class ${tree.getClass} # ${tree.uniqueId}")
// println(i"exception while transforming $tree of class ${tree.getClass} # ${tree.uniqueId}")
Copy link
Contributor

Choose a reason for hiding this comment

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

?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oops, missed that.

@smarter smarter force-pushed the backend-submodule branch from b93daa0 to 5f1852b Compare April 13, 2017 17:28
…dule

The backend lives in the scalac fork at
https://github.com/lampepfl/scala/tree/sharing-backend. Before this
commit, the scala-compiler built from this fork was a dependency of
Scala just to get this backend. This made it much more cumbersome to
test changes to the backend and also forced us to depend on Scala 2.11.5
since that is the version of scalac that the forked backend is based on.

This commit changes this by adding a git submodule in the
`scala-backend` directory that points to the scalac fork. We do not
compile the whole submodule, instead we add the subset of files we need
to the dotty-compiler project in the sbt build. See backend.md for more
information (online at
http://dotty.epfl.ch/docs/contributing/backend.html) once this commit is
merged.

The most important thing to note is that whenever you clone dotty you
should do `git clone --recursive` to also clone the submodule. If you
already have a cloned dotty you'll need to do:

git submodule update --init

You will need to repeat this command anytime you update dotty and the
backend has been updated, otherwise the content of `scala-backend` will
be stale.
@smarter smarter force-pushed the backend-submodule branch from 5f1852b to 4767786 Compare April 13, 2017 17:42
@smarter smarter merged commit 9e45ad1 into scala:master Apr 13, 2017
@smarter
Copy link
Member Author

smarter commented Apr 13, 2017

@odersky @nicolasstucki @liufengyun @OlivierBlanvillain The backend is in! Don''t forget to do:

git submodule update --init

After pulling these changes. See https://github.com/lampepfl/dotty/blob/master/docs/docs/contributing/backend.md (soon rendered at http://dotty.epfl.ch/docs/contributing/backend.html) for more information.

smarter added a commit to dotty-staging/dotty that referenced this pull request Apr 23, 2017
Now that scala#2260 has been merged, nothing is holding us back from upgrading.
@allanrenucci allanrenucci deleted the backend-submodule branch December 14, 2017 16:58
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.

2 participants