-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Extend embuilder deferred building mode to ports #23924
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
base: main
Are you sure you want to change the base?
Changes from all commits
021e0cc
ba2b0d6
f6e3bdd
eb3101c
830eddb
7082238
060947e
0ad6f2c
36090e3
94648d8
6d36a65
75b1151
3e52a80
ca3585e
a4d161e
031ff61
6faa8a5
1772acd
a6944b4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
import argparse | ||
import fnmatch | ||
import logging | ||
import os | ||
import sys | ||
import time | ||
from contextlib import contextmanager | ||
|
@@ -171,8 +172,8 @@ def clear_port(port_name): | |
|
||
|
||
def build_port(port_name): | ||
with get_port_variant(port_name) as port_name: | ||
ports.build_port(port_name, settings) | ||
with get_port_variant(port_name) as port_name_base: | ||
ports.build_port(port_name_base, settings) | ||
|
||
|
||
def get_system_tasks(): | ||
|
@@ -281,6 +282,9 @@ def main(): | |
if auto_tasks: | ||
print('Building targets: %s' % ' '.join(tasks)) | ||
|
||
if USE_NINJA: | ||
os.environ['EMBUILDER_PORT_BUILD_DEFERRED'] = '1' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So its not currently possible use ninja in non-deferred mode? I guess thats OK? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ninja still works in non-deferred mode. If you do |
||
|
||
for what in tasks: | ||
for old, new in legacy_prefixes.items(): | ||
if what.startswith(old): | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -152,7 +152,7 @@ def get_lib(libname, *args, **kwargs): | |
|
||
# Request a cached file. If it isn't in the cache, it will be created with | ||
# the given creator function | ||
def get(shortname, creator, what=None, force=False, quiet=False, deferred=False): | ||
def get(shortname, creator, what=None, force=False, quiet=False): | ||
ensure_setup() | ||
cachename = Path(cachedir, shortname) | ||
# Check for existence before taking the lock in case we can avoid the | ||
|
@@ -177,8 +177,8 @@ def get(shortname, creator, what=None, force=False, quiet=False, deferred=False) | |
logger.info(message) | ||
utils.safe_ensure_dirs(cachename.parent) | ||
creator(str(cachename)) | ||
if not deferred: | ||
dschuff marked this conversation as resolved.
Show resolved
Hide resolved
|
||
assert cachename.exists() | ||
if not os.getenv('EMBUILDER_PORT_BUILD_DEFERRED'): | ||
assert cachename.is_file() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would rather have this check done in The rational being that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, that does make sense; the only problem is that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fair enough LGTM. Maybe add a comment as to why this needs to be here. |
||
if not quiet: | ||
logger.info(' - ok') | ||
|
||
|
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.
I think this is maybe more like "full_name" ?