Skip to content

Commit

Permalink
use case insensitive comparison when searching for dependencies betwe…
Browse files Browse the repository at this point in the history
…en fable packages
  • Loading branch information
tom committed Jun 9, 2024
1 parent 1a1854a commit d16b52d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Fable.Compiler/ProjectCracker.fs
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,10 @@ let tryGetFablePackage (opts: CrackerOptions) (dllPath: string) =
let sortFablePackages (pkgs: FablePackage list) =
([], pkgs)
||> List.fold (fun acc pkg ->
match List.tryFindIndexBack (fun (x: FablePackage) -> pkg.Dependencies.Contains(x.Id)) acc with
let isPkgDependency (dependency: FablePackage) =
pkg.Dependencies
|> Set.exists (fun dep -> dep.ToLowerInvariant() = dependency.Id.ToLowerInvariant())
match List.tryFindIndexBack isPkgDependency acc with
| None -> pkg :: acc
| Some targetIdx ->
let rec insertAfter x targetIdx i before after =
Expand Down

0 comments on commit d16b52d

Please sign in to comment.