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

generate_load_scripts sub.group.fsx dependencies out of order #2911

Open
TheAngryByrd opened this issue Nov 22, 2017 · 3 comments
Open

generate_load_scripts sub.group.fsx dependencies out of order #2911

TheAngryByrd opened this issue Nov 22, 2017 · 3 comments

Comments

@TheAngryByrd
Copy link
Contributor

TheAngryByrd commented Nov 22, 2017

Description

I have a build dependency group as such

group build
  generate_load_scripts: true
  framework: >= net45
  source https://nuget.org/api/v2
  nuget Http.fs
  nuget FAKE

When paket generates the build.group.fsx it gives

#r "../../../../packages/build/Http.fs/lib/net40/HttpFs.dll" 
#r "../../../../packages/build/Hopac/lib/net45/Hopac.Core.dll" 
#r "../../../../packages/build/Hopac/lib/net45/Hopac.Platform.dll" 
#r "../../../../packages/build/Hopac/lib/net45/Hopac.dll" 

However HttpFs is dependent on Hopac as seen in the Http.fs.fsx script:

#load @"Hopac.fsx" 
#r "../../../../packages/build/Http.fs/lib/net40/HttpFs.dll" 

So when trying to use it in a FAKE script

#load @"./.paket/load/net462/build/build.group.fsx"

I end up with the error:

build.fsx(14,12): error FS0074: The type referenced through 'Hopac.Alt`1' is defined in an assembly that is not referenced. You must add a reference to assembly 'Hopac.Core'

Repro steps

https://github.com/TheAngryByrd/paket-generate-out-of-order/

Expected behavior

Either generates the dependency order correctly or delegates to calling load on direct dependencies

Actual behavior

Generates correct dependency order

Known workarounds

Calling load on things within the group directly such as:

#load ./.paket/load/net462/build/Http.fs.fsx
@enricosada enricosada added the bug label Jan 23, 2018
@enricosada
Copy link
Collaborator

i can repro in FSAC

@otto-gebb
Copy link

I encountered this, too, when editing a FAKE script referencing Http.fs.

The workaround was to edit the file ./.fake/build.fsx/intellisense_lazy.fsx manually and move the line

#r "../../packages/fakebuild/Http.fs/lib/net471/HttpFs.dll"

after the line

#r "../../packages/fakebuild/Hopac/lib/net471/Hopac.dll"

@halcwb
Copy link
Contributor

halcwb commented Feb 6, 2019

This is an old problem, but still relevant. I encountered this problem also in other generated references tools. Recently I ran into this using canopy. Canopy relies on Selenium.WebDriver, so this should be the correct order in the generated group.fsx:

#r "../../../../packages/uitests/Selenium.WebDriver/lib/net45/WebDriver.dll"
#r "../../../../packages/uitests/canopy/lib/netstandard2.0/canopy.dll"

Suppose, this issue is bigger than Paket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants