Skip to content

Commit

Permalink
Remove fable-metadata dependency.
Browse files Browse the repository at this point in the history
  • Loading branch information
Verdonck authored and Verdonck committed Feb 15, 2019
1 parent ca531d9 commit 43c6a35
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
"fable-compiler": "^2.1.0-beta-003",
"fable-loader": "^2.0.0",
"fable-splitter": "^2.0.1",
"fable-metadata": "1.0.0-beta-002",
"mocha": "^5.2.0",
"shelljs": "^0.8.3",
"terser": "^3.10.0",
Expand Down
9 changes: 4 additions & 5 deletions src/dotnet/Fable.Compiler/CLI/ProjectCracker.fs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ open Microsoft.FSharp.Compiler.SourceCodeServices
open Fable
open Dotnet.ProjInfo.Workspace
open Dotnet.ProjInfo.Workspace.FCS
open System.Runtime.InteropServices
open System.Reflection


let isSystemPackage (pkgName: string) =
Expand Down Expand Up @@ -302,6 +302,7 @@ type ScriptOption =
let getCrackedProjects (checker: FSharpChecker) (projFile: string) (rootDir: string) =
match (Path.GetExtension projFile).ToLower() with
| ".fsx" ->

let fsprojOptions = getProjectOptionsFromScript checker projFile
let parsedOptions =
fsprojOptions.OtherOptions
Expand All @@ -317,17 +318,15 @@ let getCrackedProjects (checker: FSharpChecker) (projFile: string) (rootDir: str
)

let dllReferences =
let (/) a b = Path.Combine(a,b)
let netcoreappPath = Path.GetDirectoryName(typeof<int>.GetTypeInfo().Assembly.Location)

parsedOptions
|> List.map (function | ScriptOption.Dll dll -> Some dll | _ -> None)
|> List.choose id
|> fun dllRx ->
Array.fold (fun dllRs rf ->
if not (List.exists (fun r -> Path.GetFileNameWithoutExtension(r) = rf) dllRs) then
let dllPath =
rootDir / "node_modules" / "fable-metadata" / "lib" / (sprintf "%s.dll" rf)

let dllPath = Path.Combine(netcoreappPath, (sprintf "%s.dll" rf))
dllPath::dllRs
else
dllRs
Expand Down
5 changes: 0 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2692,11 +2692,6 @@ fable-loader@^2.0.0:
dependencies:
fable-utils "^1.1.0"

fable-metadata@1.0.0-beta-002:
version "1.0.0-beta-002"
resolved "https://registry.yarnpkg.com/fable-metadata/-/fable-metadata-1.0.0-beta-002.tgz#17c49a0e96413406e864ccb08cc2b11fc1adb9e9"
integrity sha512-PVDgurXItCEYLjzJAQRls/e5mfXsPbo7LrGIj5m2Iy8gztQMXHI4i1Tc3rY+kLAcLd9wgMGgaMBxAbahwQclWA==

fable-splitter@^2.0.1:
version "2.0.2"
resolved "https://registry.yarnpkg.com/fable-splitter/-/fable-splitter-2.0.2.tgz#64d281ccc703f502fd5862d108613cee0408cd03"
Expand Down

0 comments on commit 43c6a35

Please sign in to comment.