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

local ports: use cache lock (#9342) #9391

Merged
merged 2 commits into from Sep 9, 2019

Conversation

@Beuc
Copy link
Contributor

commented Sep 5, 2019

Cf. #9342

shared.try_delete(fullname)
shutil.copytree(path, os.path.join(fullname, subdir))
Ports.clear_project_build(name)
return

This comment has been minimized.

Copy link
@sbc100

sbc100 Sep 5, 2019

Collaborator

Can you leave the return statement outside (after) the try/finally.. it makes the early return pattern more clear.

Also, the the first two lines of the try block and stay outside too I think.

This comment has been minimized.

Copy link
@Beuc

Beuc Sep 8, 2019

Author Contributor

Done :)

logger.warning('grabbing local port: ' + name + ' from ' + path + ' to ' + fullname + ' (subdir: ' + subdir + ')')
shared.try_delete(fullname)
shutil.copytree(path, os.path.join(fullname, subdir))
Ports.clear_project_build(name)

This comment has been minimized.

Copy link
@sbc100

sbc100 Sep 5, 2019

Collaborator

Presumably its these three lines that require the lock?

This comment has been minimized.

Copy link
@Beuc

Beuc Sep 8, 2019

Author Contributor

The SDL2 port deletes depending ports prior (re)building, so I'm afraid that locking only those lines will lead to build failures like SDL2 (process1) > SDL2_image (p1) > SDL2 (process2) > missing SDL2_image.
That's basically why I didn't try to be specific about the lock.
I cannot confirm right now due to #9402.
EDIT: clarified my failure scenario, needs some testing

This comment has been minimized.

Copy link
@kripken

kripken Sep 9, 2019

Member

This seems reasonable to me. Basically, any local-ports work should be locked.

@sbc100
sbc100 approved these changes Sep 5, 2019
Copy link
Collaborator

left a comment

lgtm % comments

@kripken

This comment has been minimized.

Copy link
Member

commented Sep 9, 2019

Something weird happened with the tests here, but this should be safe to merge...

@kripken kripken merged commit 4492aa5 into emscripten-core:incoming Sep 9, 2019

26 of 28 checks passed

ci/circleci: flake8 Your tests are queued
Details
ci/circleci: test-upstream-wasm2 CircleCI is running your tests
Details
ci/circleci: build Your tests passed on CircleCI!
Details
ci/circleci: build-docs Your tests passed on CircleCI!
Details
ci/circleci: build-upstream Your tests passed on CircleCI!
Details
ci/circleci: test-ab Your tests passed on CircleCI!
Details
ci/circleci: test-browser-chrome Your tests passed on CircleCI!
Details
ci/circleci: test-browser-firefox Your tests passed on CircleCI!
Details
ci/circleci: test-c Your tests passed on CircleCI!
Details
ci/circleci: test-d Your tests passed on CircleCI!
Details
ci/circleci: test-e Your tests passed on CircleCI!
Details
ci/circleci: test-f Your tests passed on CircleCI!
Details
ci/circleci: test-ghi Your tests passed on CircleCI!
Details
ci/circleci: test-jklmno Your tests passed on CircleCI!
Details
ci/circleci: test-other Your tests passed on CircleCI!
Details
ci/circleci: test-p Your tests passed on CircleCI!
Details
ci/circleci: test-qrst Your tests passed on CircleCI!
Details
ci/circleci: test-sanity Your tests passed on CircleCI!
Details
ci/circleci: test-upstream-browser-chrome Your tests passed on CircleCI!
Details
ci/circleci: test-upstream-browser-firefox Your tests passed on CircleCI!
Details
ci/circleci: test-upstream-other Your tests passed on CircleCI!
Details
ci/circleci: test-upstream-wasm0 Your tests passed on CircleCI!
Details
ci/circleci: test-upstream-wasm2js1 Your tests passed on CircleCI!
Details
ci/circleci: test-upstream-wasm3 Your tests passed on CircleCI!
Details
ci/circleci: test-uvwxyz Your tests passed on CircleCI!
Details
ci/circleci: test-wasm0 Your tests passed on CircleCI!
Details
ci/circleci: test-wasm2 Your tests passed on CircleCI!
Details
ci/circleci: test-wasm3 Your tests passed on CircleCI!
Details

@Beuc Beuc deleted the Beuc:patch-9342 branch Sep 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.