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
9 changes: 4 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,10 @@ jobs:
build-dart:
runs-on: ubuntu-latest
timeout-minutes: 45
# Without id-token, setup-dart skips the pub.dev token, so packages are
# fetched anonymously.
permissions:
contents: read

steps:
- uses: actions/checkout@v7.0.1
Expand All @@ -286,11 +290,6 @@ jobs:
- name: Setup Dart SDK
uses: dart-lang/setup-dart@v1

# setup-dart registers a pub.dev token, which pub then sends on dependency
# fetches too. This job only consumes packages, so drop it and stay anonymous.
- name: Use pub.dev anonymously
run: dart pub token remove https://pub.dev

- name: Fable Tests - Dart
run: ./build.sh test dart

Expand Down
2 changes: 1 addition & 1 deletion src/Fable.Transforms/Python/Prelude.fs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ module Naming =

let reflectionSuffix = "_reflection"

let mutable uniqueIndex = 0
let mutable private uniqueIndex = 0

let getUniqueIndex () =
let idx = uniqueIndex
Expand Down
8 changes: 4 additions & 4 deletions src/fable-standalone/src/Worker/Worker.fs
Original file line number Diff line number Diff line change
Expand Up @@ -285,16 +285,16 @@ let private compileFiles fable fsharpNames fsharpCodes (filesToEmit: string[]) l
)
()

let mutable errors = parseResults.Errors
let errors = ResizeArray parseResults.Errors
let mutable fableTransformTime = 0.
let compiledCode = ResizeArray()

if not (parseResults.Errors |> Array.exists (fun e -> not e.IsWarning)) then
for fileName in filesToEmit do
let! code, fableErrors, transformTime = emitFile fable parseResults fileName language fableOptions

compiledCode.Add(code)
errors <- Array.append errors fableErrors
compiledCode.Add code
errors.AddRange fableErrors
fableTransformTime <- fableTransformTime + transformTime

let stats: CompileStats =
Expand All @@ -304,7 +304,7 @@ let private compileFiles fable fsharpNames fsharpCodes (filesToEmit: string[]) l
Fable_transform = fableTransformTime
}

return (compiledCode.ToArray(), errors, stats)
return (compiledCode.ToArray(), errors.ToArray(), stats)
}

let private describeError (er: exn) =
Expand Down
Loading