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 (fable-compiler#3835)

* use case insensitive comparison when searching for dependencies between fable packages

* chore: Update changelog

---------

Co-authored-by: tom <leko.tomas@fronius.com>
Co-authored-by: Maxime Mangel <mangel.maxime@protonmail.com>
  • Loading branch information
3 people authored Jun 10, 2024
1 parent 1a1854a commit c13d8ad
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Fable.Cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed

* [TS] Fixed interface indexers (#3830) (by @ncave)
* [GH-3835](https://github.com/fable-compiler/Fable/pull/3835) [All] Use case insensitive comparison when searching for dependencies between fable packages (by @ThisFunctionalTom)

## 4.18.0 - 2024-05-23

Expand Down
6 changes: 5 additions & 1 deletion src/Fable.Compiler/ProjectCracker.fs
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,11 @@ 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
4 changes: 4 additions & 0 deletions src/fable-compiler-js/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

### Fixed

* [GH-3835](https://github.com/fable-compiler/Fable/pull/3835) [All] Use case insensitive comparison when searching for dependencies between fable packages (by @ThisFunctionalTom)

## 1.2.2 - 2024-05-24

### Fixed
Expand Down

0 comments on commit c13d8ad

Please sign in to comment.