Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .changes/caching-token-source-await
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
patch type="fixed" "CachingTokenSource.fetch now awaits its result, so errors surface and the in-flight entry is cleared correctly"
6 changes: 6 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ jobs:
- uses: ./.github/actions/setup-flutter
- name: Dart Analyze Check
run: flutter analyze
# `flutter analyze` runs Flutter's AnalysisOptionsMigration first, which
# forces `web/**` into analysis_options.yaml. This package keeps real Dart
# source there (the E2EE worker), so analyze it separately -- `dart
# analyze` does not run migrators.
- name: Dart Analyze Check (web sources)
run: dart analyze web/

dart-test-check:
name: Dart Test
Expand Down
12 changes: 12 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,18 @@ analyzer:
# Manager is enabled and this package ships Package.swift.
- build/**
- example/build/**
# Flutter's AnalysisOptionsMigration (flutter_tools) appends these seven
# patterns to this file on every `flutter analyze`/`pub get`/`run`. There is
# no opt-out, so they are committed here to stop the file being rewritten.
# Note this excludes web/, which in this package holds real Dart source (the
# E2EE worker) rather than just assets -- CI analyzes it explicitly with
# `dart analyze web/`, which does not run migrators.
- android/**
- ios/**
- web/**
- windows/**
- macos/**
- linux/**

linter:
rules:
Expand Down
4 changes: 2 additions & 2 deletions lib/src/token_source/caching.dart
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,13 @@ class CachingTokenSource implements TokenSourceConfigurable {
final cached = await _store.retrieve();
if (cached != null && cached.options == options && _validator(cached.options, cached.response)) {
completer.complete(cached.response);
return resultFuture;
return await resultFuture;
}

final response = await _wrapped.fetch(options);
await _store.store(options, response);
completer.complete(response);
return resultFuture;
return await resultFuture;
} catch (e, stackTrace) {
completer.completeError(e, stackTrace);
rethrow;
Expand Down
1 change: 1 addition & 0 deletions scripts/check_version.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env dart

/*
* Copyright 2025 LiveKit
*
Expand Down
1 change: 1 addition & 0 deletions scripts/create_change.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env dart

/*
* Copyright 2025 LiveKit
*
Expand Down
1 change: 1 addition & 0 deletions scripts/create_version.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env dart

/*
* Copyright 2025 LiveKit
*
Expand Down
45 changes: 45 additions & 0 deletions web/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#
# Copyright 2025 LiveKit
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# The repository-root analysis_options.yaml has to exclude `web/**`: Flutter's
# AnalysisOptionsMigration appends that pattern on every `flutter analyze` and
# offers no way to opt out. These files are real Dart source (the E2EE worker),
# not web assets, so this file gives them their own analysis context and keeps
# them covered. CI analyzes them via `dart analyze web/`.

include: package:lints/recommended.yaml

analyzer:
errors:
constant_identifier_names: ignore
use_super_parameters: ignore
avoid_print: ignore
deprecated_member_use_from_same_package: ignore

linter:
rules:
# Preference of the SDK
prefer_single_quotes: true
prefer_final_locals: true
unnecessary_brace_in_string_interps: false
avoid_print: true

# Enforce this for correct async logic
unawaited_futures: true
discarded_futures: true

formatter:
page_width: 120
trailing_commas: preserve
Comment thread
devin-ai-integration[bot] marked this conversation as resolved.
Loading