Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use case insensitive comparison when searching for dependencies between fable packages #3835

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 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
Loading