-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Put in place some minimum browser versions #20924
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
Conversation
4e7b854 to
965664e
Compare
965664e to
02a61e2
Compare
|
This seems like an answer to #20601, but it doesn't seem the discussion there came to any conclusion. |
kripken
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we not pass "0" to Babel, which I would (perhaps overly optimistically) hope tells it to support as far back as it possibly can?
I'm not totally sure if that works or not. I think maybe it does? But I still think this approach is better as it allows us to move forward to removing code that we know we don't need. |
By experimentation I think you are correct.. Putting |
|
I believe you should just not pass |
02a61e2 to
05ba997
Compare
I think this PR does better than that though, since its precise. |
05ba997 to
389014b
Compare
|
I don't see the benefit of the extra precision, myself. Just letting Babel do its best as far back as it can seems good enough? @sbc100 what do you see as the advantages of knowing the specific versions? |
If you give babel the precise information it can just perform the need transformations for the specific browsers. Or are you talking specifically about the |
Maybe I'm confused then. What is the difference? I mean that I only see these 3 situations, which we handle before this PR:
All those seem to be as precise as possible already, letting Babel do its thing. Which of them does this PR improve? Or is there a 4th situation I am missing? |
389014b to
c78485d
Compare
I was thinking that we could improve the 3rd case but it seems I was wrong, so I've reverted the 0 -> OLDEST_SUPPORTED_XX part if this change. Now LEGACY_VM_SUPPORT and MIN_XXX_VERION=0 maintina the zero value, including when passed to babel. |
c78485d to
ac514ee
Compare
|
Are you saying you thought to help the 3rd case and reverted that - what benefit is meant to be left, then? I took another look at the code, and I still don't understand how it improves on the 3 cases, sorry - I feel like I'm missing something. |
|
What I am still asking, basically is: why add these minimum browser versions, if they do not help the 3 cases I mentioned? Is the benefit elsewhere? |
See #20601. Basically setting min versions allows us to, over time, remove workarounds and hacks that exist only to support certain older browser versions (e.g. the Promise polyfill) and do this in a principled way. A good example, with changes like #20925 it would be more principled if we could say for sure that we catigorically don't support chrome versions older than 37. |
ac514ee to
3124b17
Compare
Hah, ironically, #20925 and few more similar workarounds I saw in html5 and webgl libs was precisely the reason I started that discussion that branched off into #20601. Would love to see some clear decision made there. |
Do you object to the PR as a starting point though? It seems like we can bikeshed the precise policy and precise current limits later, right? This change is just designed as just the first step. |
Not to the versions, no - personally, the higher the easier - but I would start by documenting minimal versions we support in public docs, and then enforcing them in code, rather than other way around, to make sure there are no surprises. It would also be good to get confirmation those minimal versions look good from eg @brionv and @juj too (and anyone else who works on projects large enough to potentially care about very old browsers). |
kripken
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rationale makes sense to me. lgtm % comments.
3124b17 to
a8c7965
Compare
Having these minimums in place will allows us to remove support for older browsers from the codebase over time. For example, as a followup to this change we should be able to remove out polyfills for Promise and for Object.assign. Fixes: emscripten-core#20601
a8c7965 to
02ce44d
Compare
These polyfills were only used for browsers that are no longer supported by emscripten. See emscripten-core#20924.
Having these minimums in place will allows us to remove support for
older browsers from the codebase over time. For example, as a followup
to this change we should be able to remove out polyfills for Promise and
for Object.assign.
See #20601