Fable: How to reference local build?

Created on 19 May 2017  路  5Comments  路  Source: fable-compiler/Fable

In https://github.com/fable-compiler/Fable/pull/884, @MangelMaxime asked about using a local build of Fable, and @forki mentioned that it might be possible to use paket.local for this.

In the documentation they give an example based on a NuGet target in the FAKE script which generates a NuGet package that can then be referenced. Fable has no such target, and the NuGet build seems to be nested inside pushNuget, which is part of the PublishPackages target.

Now that Fable is using Paket, what's the best way to install a custom build into a project (for testing purposes or otherwise)?

Most helpful comment

Just remove Fable.Core from your paket.dependencies and add a direct reference to the library, as the Fable tests do.

The paket.local feature is there so that changing paket.dependencies is not required. (https://fsprojects.github.io/Paket/local-file.html)

I think it would be enough to just separate the nupkg creation and the push in the fake script into two targets. That way a local build can create the nupkg and paket can then reference that.

All 5 comments

I think it would be helpful to put together some contributing docs and include this with the move to Paket.

I think in #884 @MangelMaxime was talking about referencing other projects locally as if they were packages. But if you want to use a version of the Fable compiler build locally you can take a look at the QuickTest. The only thing you need to do is call directly the dotnet-fable.dll and if you also want to use local fable-core JS files, pass the path to the Fable options :+1:

@alfonsogarciacaro I'm not sure I understand. I'll try to clarify exactly what I'm asking:

  • I have a paket.dependencies that includes nuget Fable.Core and a paket.references that includes Fable.Core

  • I have cloned the Fable repository, and I want to make a change to Fable.Core and test that change in the context of my project

What's the best way to:

  1. build Fable.Core locally

  2. Reference this local Fable.Corein another project?

Ok, that's more or less the same :+1:

build Fable.Core locally

After cloning the project, if you touch any of the dotnet files, run build FableTools. If you touch any of the fable-core Typescript/JS files, run build FableCoreJs (in the later case remember to pass the fableCore path to the loader options).

Reference this local Fable.Corein another project?

Just remove Fable.Core from your paket.dependencies and add a direct reference to the library, as the Fable tests do.

I hope this helps you, please tell me if you have more questions :)

Just remove Fable.Core from your paket.dependencies and add a direct reference to the library, as the Fable tests do.

The paket.local feature is there so that changing paket.dependencies is not required. (https://fsprojects.github.io/Paket/local-file.html)

I think it would be enough to just separate the nupkg creation and the push in the fake script into two targets. That way a local build can create the nupkg and paket can then reference that.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

forki picture forki  路  3Comments

alfonsogarciacaro picture alfonsogarciacaro  路  3Comments

theprash picture theprash  路  3Comments

MangelMaxime picture MangelMaxime  路  3Comments

alfonsogarciacaro picture alfonsogarciacaro  路  3Comments