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

Add a http file reference as project reference #1341

Closed
jruizaranguren opened this Issue Jan 5, 2016 · 9 comments

Comments

Projects
None yet
2 participants
@jruizaranguren
Contributor

jruizaranguren commented Jan 5, 2016

I have added a dll library downloaded as an http reference within a group. The paket.dependencies file contains:

group Files
http file:///absolute/path/to/library.dll target/path/library.dll

Then in the paket.references file I use:

group Files
    File:library.dll

This is adding a content node in the references ItemGroup in the .csproj, such as:

    <Content Include="..\..\paket-files\files\localhost\target\path\library.dll">
      <Paket>True</Paket>
      <Link>paket-files/library.dll</Link>
    </Content>
    ...
    <Reference Include="System" />
    ...

This is just a link to the source file which I can not use to create a project reference.

Is there any way to add this file as a project reference?

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Jan 5, 2016

Member

not yet. but I think it's not that hard to do.
let me see if I can hack something together

Member

forki commented Jan 5, 2016

not yet. but I think it's not that hard to do.
let me see if I can hack something together

@forki forki added the enhancement label Jan 5, 2016

@jruizaranguren

This comment has been minimized.

Show comment
Hide comment
@jruizaranguren

jruizaranguren Jan 5, 2016

Contributor

Thanks. If you give me some clues I might try to make the enhancement.

Contributor

jruizaranguren commented Jan 5, 2016

Thanks. If you give me some clues I might try to make the enhancement.

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Jan 5, 2016

Member

it would be useful if you could generate a minimal repro that uses a sample dll (doesn't need to compile - dll might be 0 bytes)

Member

forki commented Jan 5, 2016

it would be useful if you could generate a minimal repro that uses a sample dll (doesn't need to compile - dll might be 0 bytes)

@jruizaranguren

This comment has been minimized.

Show comment
Hide comment
@jruizaranguren

jruizaranguren Jan 5, 2016

Contributor

As a couple of tests or a folder with all required files (source file, solution file, project file)?

Contributor

jruizaranguren commented Jan 5, 2016

As a couple of tests or a folder with all required files (source file, solution file, project file)?

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Jan 5, 2016

Member

yes a folder with all required files would be nice. I would then put this into our integration test suite

Member

forki commented Jan 5, 2016

yes a folder with all required files would be nice. I would then put this into our integration test suite

@jruizaranguren

This comment has been minimized.

Show comment
Hide comment
@jruizaranguren

jruizaranguren Jan 5, 2016

Contributor

Here you have. http path must be changed!.

i001341.zip

Contributor

jruizaranguren commented Jan 5, 2016

Here you have. http path must be changed!.

i001341.zip

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Jan 5, 2016

Member

please test the 2.40.7 version.
I added your sample repo as integration test and implemented a fix. but Im not completely sure if it works. so please see it as an alpha version that needs further testing.

Member

forki commented Jan 5, 2016

please test the 2.40.7 version.
I added your sample repo as integration test and implemented a fix. but Im not completely sure if it works. so please see it as an alpha version that needs further testing.

@jruizaranguren

This comment has been minimized.

Show comment
Hide comment
@jruizaranguren

jruizaranguren Jan 7, 2016

Contributor

Starting with a greenfield folder, it succesfully creates a project reference to the dll. But there are some undesirable behaviors:

  • It copies the dll to a new local folder below the project folder: paket-files/library.dll. This is not needed because the library is already downloaded below the paket-files directory. Only the project reference should be created.
  • When the reference is deleted in paket.references, it succesfully deletes the reference, but the mentioned new local file paket-files/library.dll is not deleted.
  • When paket-files/library.dll is found below the project directory, the installation fails. So forced updates of the library will fail.
  • If we already had the library referenced as a link in a content item, this is not deleted when the new reference is added (minor issue to be documented).
Contributor

jruizaranguren commented Jan 7, 2016

Starting with a greenfield folder, it succesfully creates a project reference to the dll. But there are some undesirable behaviors:

  • It copies the dll to a new local folder below the project folder: paket-files/library.dll. This is not needed because the library is already downloaded below the paket-files directory. Only the project reference should be created.
  • When the reference is deleted in paket.references, it succesfully deletes the reference, but the mentioned new local file paket-files/library.dll is not deleted.
  • When paket-files/library.dll is found below the project directory, the installation fails. So forced updates of the library will fail.
  • If we already had the library referenced as a link in a content item, this is not deleted when the new reference is added (minor issue to be documented).

forki added a commit that referenced this issue Jan 7, 2016

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Jan 7, 2016

Member

just fixed this. paket-files/library.dll is no longer copied.
regarding docs - could you please take a look at https://github.com/fsprojects/Paket/blob/master/docs/content/http-dependencies.md and send a PR with some docs improvements that you find useful? would help a lot

Member

forki commented Jan 7, 2016

just fixed this. paket-files/library.dll is no longer copied.
regarding docs - could you please take a look at https://github.com/fsprojects/Paket/blob/master/docs/content/http-dependencies.md and send a PR with some docs improvements that you find useful? would help a lot

@forki forki closed this Jan 7, 2016

forki added a commit that referenced this issue Jan 18, 2016

Merge pull request #1406 from tracasa/master
improve http-dependencies documentation #1341
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment