Skip to content

Remove 0.6.x from living documentation #526

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 3 commits into from
Dec 9, 2020
Merged

Remove 0.6.x from living documentation #526

merged 3 commits into from
Dec 9, 2020

Conversation

gzm0
Copy link
Contributor

@gzm0 gzm0 commented Dec 8, 2020

We keep it in the history of announcements of course.

@gzm0 gzm0 requested a review from sjrd December 8, 2020 08:46
Copy link
Member

@sjrd sjrd left a comment

Choose a reason for hiding this comment

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

Should we send a Request for Comments about this PR on gitter? For all we know, there can still be a number of codebases stuck with 0.6.x in companies.

Or perhaps we can preserve the list of differences in the doc in a separate page?

@@ -67,7 +65,7 @@ First, in any of the 4 above statements, if the referenced variable is not decla
This is also what would happen in JavaScript when accessing a non-existent global variable.

Second, whereas `val x = Globals.foo` translates to `var x = foo`, `val g = Globals` has no valid translation in JavaScript, and is a compile-time error.
Indeed, *since ECMAScript 2015*, there is no JavaScript value that `g` could assume, such that `g.foo` would evaluate to the global variable `foo` (until ECMAScript 5.1, `g` could have been the *global object*, and this is what Scala.js 0.6.x did).
Indeed, *since ECMAScript 2015*, there is no JavaScript value that `g` could assume, such that `g.foo` would evaluate to the global variable `foo` (until ECMAScript 5.1, `g` could have been the *global object*, and this is what earlier versions of Scala.js did).
Copy link
Member

Choose a reason for hiding this comment

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

This formulation is less precise. It could refer to Scala.js 1.1.0, for example. I believe here "Scala.js 0.6.x" remains more appropriate.

@@ -202,7 +200,7 @@ The example means that it is not possible to dynamically look up a global variab

### Testing whether a global variable exists

In Scala.js 0.6.x, it was possible to test whether a global variable exists (e.g., to perform a feature test) as follows:
In earlier versions Scala.js, it was possible to test whether a global variable exists (e.g., to perform a feature test) as follows:
Copy link
Member

Choose a reason for hiding this comment

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

There is the same problem here. IMO "Scala.js 0.6.x" remains better here.

As an alternative, we could write this a bit more with something like:

In order to test whether a global variable exists (e.g., to perform a feature test), we might be tempted to use the following test:
...
However, accessing js.Dynamic.global.Promise will throw a ReferenceError if Promise is not defined.
Instead, you must use js.typeOf:

@@ -11,13 +11,13 @@ This will generate `.sjsir` and `.class` files for each class in your project (j

The `.sjsir` files are an internal representation which can be linked to actual JavaScript code as will be explained shortly.

## Produce one JavaScript file
## Produce JavaScript
Copy link
Member

Choose a reason for hiding this comment

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

The changes in this section are not related to dropping the doc of 0.6.x. They should be in a separate PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ouch, good catch. This was me trying to update the doc quickly :P

@gzm0
Copy link
Contributor Author

gzm0 commented Dec 8, 2020

Should we send a Request for Comments about this PR on gitter?

Yes maybe. I'd prefer that to simply keeping it around on the off-chance that somebody needs it. On the flip-side, if somebody actually does need it, we can gain a better understanding of what they still need.

@gzm0
Copy link
Contributor Author

gzm0 commented Dec 8, 2020

Copying @JD557's reply from gitter:

I'm not sure if there are a lot of people in the same situation, but I think it would be nice to wait for scala-native to be updated to 0.4.0 first (which should be pretty close). I'm currently "stuck" (not really anymore, but I'll pretend that's still true) with 0.6.x because most crossbuilt libraries have an older version supporting scala.js 0.6.x/native 0.3.9 and a recent one supporting scala.js 1.x.x/native 0.4.0-M2.

@gzm0
Copy link
Contributor Author

gzm0 commented Dec 9, 2020

I have added an additional commit that references the last version of this website with 0.6.x doc in the EOL announcement. This might be an acceptable middle ground.

Copy link
Member

@sjrd sjrd left a comment

Choose a reason for hiding this comment

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

Yes, that sounds like an acceptable compromise.

@gzm0 gzm0 merged commit d6d9d98 into scala-js:master Dec 9, 2020
@gzm0 gzm0 deleted the no-06 branch December 9, 2020 09:28
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