question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Related: https://github.com/fable-compiler/Fable/issues/856

I’ve been thinking about how we could use Paket for Fable dependencies. In 1.0 cycle, Fable libraries directly distribute their source code and it’s the final user who takes care of compiling all the files (and bundle them) in order to get a better control of the whole compilation. The final user references libraries as project references.

There are two main things to consider here:

Distributing the packages and version management

After considering this, I think the easiest thing to do would be to just move Fable packages to Nuget (they’re currently in npm), so downloading, version management, etc. is automatically handled by Paket. Fable lib authors would just have to make sure that the sources of their projects are distributed as content in their Nuget packages.

Reference Fable libs from user project

This is currently done by following the convention that Fable libs must have a single .fsproj in the root folder which users reference as <ProjectReference Include="path/to/node_modules/package-name/Project.Name.fsproj" />. This more or less works but the ugliest part is how to resolve the references among Fable dependencies, as the paths differ from lib development and when being consumed by the final user. At the moment this is solved by using a hard-coded condition that detects if the .fsproj file is in node_modules folder or not, if so it assumes other dependencies are on the same level.

An alternative way would be to make Paket create an artificial .fsproj file in the obj folder containing all the files from the dependency projects and reference it from the user project. I think @enricosada suggested something like this. The main trick is to create the whole dependency graph to order the files properly. Fable itself follows a similar strategy as it collects all files from referenced projects before sending them to FCS.

Thoughts?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:14 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
forkicommented, May 7, 2017

they are now ordered so that a package down in the list only references packages above itself (similar to what we do with fs files in a fsproj).

1reaction
matthidcommented, May 5, 2017

Crazy thinking:

What about adding a frontend to npm into paket to stay in npm ecosystem as @forki is suggesting time and time again?

So having something like fablegroup where you can add npm packages. Resolving and installing via npm and adding some fable specific logic on top?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fable Reader Support
Advice and answers from the Fable Reader Support Team. ... Are any books included in my Fable membership? What is Fable? How do...
Read more >
Fable Help Center
Fable Help Center. ... Advice and answers from the Fable Team ... Start here to get an overview of Fable's core concepts as...
Read more >
Support - Fable Tech Labs
Reach out to our expert support team to get assistance with Fable's accessibility platform. We get back to all requests within 2 business ......
Read more >
Contact us | Fable Home
Live Chat. Have a quick question? We're here to help from 9am to 5pm EST. Chat with us ; Email. Drop us a...
Read more >
Fable Support & FAQs
The best way to update your order is to e-mail us at help@fablepets.com. How can I check the status of my order?
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found