Skip to content
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

Emscripten ports have broken backward compatibility #3144

Closed
TelpeNight opened this issue Jan 21, 2015 · 6 comments
Closed

Emscripten ports have broken backward compatibility #3144

TelpeNight opened this issue Jan 21, 2015 · 6 comments

Comments

@TelpeNight
Copy link

We use current latest version of emscripten (1.27) with SDL2 port (USE_SDL=2). We have been using cached version of SDL from ~/.emscripten_ports until now. Few days ago we tried to fetch the latest version of SDL port from github by manually clearing cache. Now our project is broken in all browsers.
Please, see #3060 and emscripten-ports/SDL2#2. The problem is that emscripten 1.27 still has the old buggy code:

var rect = (target === window) ? { left: 0, top: 0 } : target.getBoundingClientRect();

But SDL port relies on latest changes (see emscripten-ports/SDL2@8d47621). So latest emscripten 1.27 and master branch of SDL post are not compatible.
We don't want to switch to emscripten's master branch, and 1.27 is the latest version available in emsdk. So we had to manually patch emscripten's sources to be compatible with SDL port.

I have 2 suggestion:

  1. Provide each emscripten version with some stable and well tested tags of ports.
  2. Allow developers to configure repository, branch and tag of each port. So developers can use their own forks for quick bug fixes and testing.

Right now we are going to modify local sdl.py. We will use our own sdl port fork to increase stability.

@kripken
Copy link
Member

kripken commented Jan 21, 2015

True, we should make ports use a version specific to the emscripten version. Will try to get to that today.

@kripken
Copy link
Member

kripken commented Jan 21, 2015

Done. I don't think we'll backport this, but going forward, emscripten versions will use specific ports versions.

@kripken kripken closed this as completed Jan 21, 2015
@TelpeNight
Copy link
Author

I still suggest to allow developers to configure repository, branch and tag of each port. Should I open it as a separate feature request?

@kripken kripken reopened this Jan 22, 2015
@kripken
Copy link
Member

kripken commented Jan 22, 2015

No need, we can reopen this. Perhaps I didn't fully understand, then. How specifically are you suggesting the user would define those things?

@TelpeNight
Copy link
Author

Dunno exactly. Maybe by specifying some config file as a build option. Something like --port-config some_file. some_file would allow to override repo and/or tags of each port.

var Ports = {
    SDL2 : {
        repo: 'AlisGames',
        tag: 'stable', /* or branch: 'stabe' */
    }
}

mergeInto(PortManager.ports, Ports);

For example you can use this library-like syntax. I'm not sure, that this is the best way. Maybe you can find better solution.

@kripken
Copy link
Member

kripken commented Jan 23, 2015

Perhaps. Let's see what other people think/suggest.

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

No branches or pull requests

2 participants