Move editor UI into the app and release verified Core dependencies (#14)
Gitea CI / Assemble and validate CI artifacts (push) Successful in 1m47s
Gitea CI / Check code and tests (push) Successful in 7m15s
Gitea CI / Build Android APK (push) Successful in 4m6s
Gitea CI / Build Windows x64 app (push) Successful in 3m34s
Gitea CI / Audit and package Windows x64 (push) Successful in 1m29s
Gitea CI / Gitea CI passed (push) Successful in 1s
Gitea Release / Prepare draft Release (push) Failing after 8s
Gitea Release / Upload Android to draft Release (push) Skipped
Gitea Release / Upload Windows to draft Release (push) Skipped
Gitea Release / Verify and publish Release (push) Skipped
Gitea CI / Assemble and validate CI artifacts (push) Successful in 1m47s
Gitea CI / Check code and tests (push) Successful in 7m15s
Gitea CI / Build Android APK (push) Successful in 4m6s
Gitea CI / Build Windows x64 app (push) Successful in 3m34s
Gitea CI / Audit and package Windows x64 (push) Successful in 1m29s
Gitea CI / Gitea CI passed (push) Successful in 1s
Gitea Release / Prepare draft Release (push) Failing after 8s
Gitea Release / Upload Android to draft Release (push) Skipped
Gitea Release / Upload Windows to draft Release (push) Skipped
Gitea Release / Verify and publish Release (push) Skipped
This commit was merged in pull request #14.
This commit is contained in:
1 parent
abc1868550
commit
06f1c26681
452 files changed
+43806
-2329
No files matched your search
@@ -9,10 +9,14 @@ ROOT = Path(__file__).resolve().parent.parent
|
||||
RUNTIME = {
|
||||
'cutdex_native': {'flutter', 'path'},
|
||||
'cutdex_ui': {'flutter', 'cutdex_native', 'freezed_annotation'},
|
||||
'cutdex_timeline_ui': {'flutter', 'cutdex_core'},
|
||||
'cutdex_preview': {'flutter', 'cutdex_core', 'cutdex_native_flutter', 'cutdex_timeline_ui'},
|
||||
}
|
||||
DEVELOPMENT = {
|
||||
'cutdex_native': {'flutter_test', 'flutter_lints'},
|
||||
'cutdex_ui': {'flutter_test', 'flutter_lints', 'build_runner', 'freezed'},
|
||||
'cutdex_timeline_ui': {'flutter_test', 'flutter_lints'},
|
||||
'cutdex_preview': {'flutter_test', 'flutter_lints'},
|
||||
}
|
||||
TOKENS = re.compile(
|
||||
r"//[^\n]*|/\*.*?\*/|"
|
||||
@@ -51,6 +55,18 @@ def package_uri(uri):
|
||||
return dependency, posixpath.normpath(unquote(path))
|
||||
|
||||
|
||||
def native_channels(source):
|
||||
"""Recognize reserved wire names, ignoring comments and ordinary text."""
|
||||
for token in TOKENS.finditer(source):
|
||||
if token.lastgroup != 'string':
|
||||
continue
|
||||
value = token.group().removeprefix('r')
|
||||
quote = value[0] * (3 if value[:3] == value[0] * 3 else 1)
|
||||
value = value[len(quote):-len(quote)]
|
||||
if value == 'cutdex_runtime' or value.startswith('cutdex_runtime/'):
|
||||
yield value
|
||||
|
||||
|
||||
def dependency_names(manifest, section):
|
||||
"""Read the flat dependency keys used by our workspace manifests."""
|
||||
match = re.search(rf'^{section}:\s*\n(.*?)(?=^\S|\Z)', manifest,
|
||||
@@ -66,6 +82,10 @@ def check(root):
|
||||
def reject(source, message):
|
||||
errors.append(f'{source.relative_to(root)}: {message}')
|
||||
|
||||
def check_transport(source, content):
|
||||
for channel in native_channels(content):
|
||||
reject(source, f'native channel {channel} belongs to cutdex_native_flutter transport')
|
||||
|
||||
for package, allowed in RUNTIME.items():
|
||||
directory = root / 'packages' / package
|
||||
manifest_path = directory / 'pubspec.yaml'
|
||||
@@ -84,7 +104,10 @@ def check(root):
|
||||
if area != 'lib':
|
||||
declared |= dev_dependencies
|
||||
for source in (directory / area).rglob('*.dart'):
|
||||
for kind, uri in directives(source.read_text(encoding='utf-8')):
|
||||
content = source.read_text(encoding='utf-8')
|
||||
if area == 'lib':
|
||||
check_transport(source, content)
|
||||
for kind, uri in directives(content):
|
||||
if uri.startswith('package:'):
|
||||
dependency, path = package_uri(uri)
|
||||
if dependency not in declared:
|
||||
@@ -99,7 +122,10 @@ def check(root):
|
||||
|
||||
for area in ['lib', 'test', 'integration_test', 'test_driver', 'tool']:
|
||||
for source in (root / area).rglob('*.dart'):
|
||||
for kind, uri in directives(source.read_text(encoding='utf-8')):
|
||||
content = source.read_text(encoding='utf-8')
|
||||
if area == 'lib':
|
||||
check_transport(source, content)
|
||||
for kind, uri in directives(content):
|
||||
if uri.startswith('package:'):
|
||||
dependency, path = package_uri(uri)
|
||||
if dependency != 'cutdex' and (path == 'src' or path.startswith('src/')):
|
||||
|
||||
Reference in new issue
Block a user