Geonovum / respec

A tool for creating technical documents and web standards. Geonovum fork to modify respec for own use.
Other
2 stars 1 forks source link

Respec not working in Edge 38.x #143

Closed lvdbrink closed 6 years ago

lvdbrink commented 6 years ago

Nanko and Erik reported respec is not showing documents as expected in their browser. They are using Edge 38.x. What exactly Edge is showing them I don’t know yet.

Nanko has: Microsoft Edge 38.14393.2068.0 Microsoft EdgeHTML 14.14393

lvdbrink commented 6 years ago

@fterpstra did you see? Any more details?

marcoscaceres commented 6 years ago

That version of Edge seems a bit old, but would like to hear any details.

From Wikipedia, that version was released August 2, 2016 (so exactly 2 years ago).

Any details of why they are unable to update to a newer version of Edge would also be helpful.

lvdbrink commented 6 years ago

I talked to Erik who has exactly the same Edge version as Nanko.

He showed me what a Respec document looks like in his Edge version: it's showing only the bare HTML contents of the index.html document.

There are no script errors reported in de dev console except something I would not think is related:

SCRIPT7002: XMLHttpRequest: Network Error 0x80700013, http://download.microsoft.com/download/B/9/F/B9FF9327-7A72-4165-BF91-9B7EEB6C579B/DeviceList.json 10 SCRIPT7002: XMLHttpRequest: Network Error 0x80700013, http://download.microsoft.com/download/B/9/F/B9FF9327-7A72-4165-BF91-9B7EEB6C579B/DeviceList.json 10

The problem with updating to a newer Edge version is I guess common: These people work for large (govt) organizations with centralized IT management. They can't install much themselves. They work with Windows 10, updates for which (including Edge update I assume) are centrally deployed periodically by the IT department (not all that often as far as I can gather).

marcoscaceres commented 6 years ago

We can change Babel's setting to make sure that the generated JavaScript works with older versions of Edge (though supporting IE will probably be hard). We can also add any necessary polyfills. Happy to discuss. The only drawback might be somewhat larger deployment size for ReSpec for Geonovum, but I don't think it will be super large or much slower.

However, it's not something we would do on the W3C side, as we only track latest released browsers. Nonevertheless, that should not prevent us from supporting a larger set of users on the Geonovum side.

marcoscaceres commented 6 years ago

The thing to play with is: https://github.com/Geonovum/respec/blob/develop/.babelrc

And use: https://babeljs.io/docs/en/babel-preset-env/

To target the particular version of Edge (and other browsers) you want to support.

lvdbrink commented 6 years ago

Thank you! Will try that. For us it's probably worth doing if we want to reach our target audience.

thijsbrentjens commented 6 years ago

@marcoscaceres thanks for pointing to this. I'm new to this, it's a bit hard for me to (fully) understand what is going on with this babel build.

It took me some time, but I can build something now that should be supported in Edge 14. That is: it builds successfully for Edge >= 14. When using the build I'm getting an error however in Firefox and in Chrome:

Uncaught ReferenceError: regeneratorRuntime is not defined

If you have any suggestions how to proceed / find good settings for this, please let me know.

marcoscaceres commented 6 years ago

@marcoscaceres thanks for pointing to this. I'm new to this, it's a bit hard for me to (fully) understand what is going on with this babel build.

Ok, so, what babel configuration did you end up using?

It took me some time, but I can build something now that should be supported in Edge 14. That is: it builds successfully for Edge >= 14. When using the build I'm getting an error however in Firefox and in Chrome:

So, what's happening is that it's trying to use "regeneratorRuntime", but the babel polyfill is missing.

What we need to figure out is if we can globally include the "regeneratorRuntime" for you.

marcoscaceres commented 6 years ago

Ok, so https://github.com/Geonovum/respec/pull/147 will get us part of the way there. We might still need to include the regenerator as a dependency.

marcoscaceres commented 6 years ago

Ok, so I did a bit more archeology. Problem is that, even if we fix this for the geonovum modules, none of the ReSpec core modules use the regenerator runtime anymore (so we will still get a failure). There are only two options:

  1. Geonovum back ports to ReSpec ~v10.1.12 (or close to) - which was still using the regeneratorRuntime.
  2. See if the organizations that are affected can either update Edge to something newer (for their own security) or if they can use more modern browsers such as Firefox or Chrome.
thijsbrentjens commented 6 years ago

Thanks. To me it seems the second option is the best. I think going back to such an old version is a good idea. If we create snapshots, we could work around the issue. @lvdbrink shall we close this issue?

lvdbrink commented 6 years ago

I take it you mean going back to such an old version is not a good idea :-)

I agree.