Skip to content

Duplicates appear in generated scripts. #2716

Closed

Description

@isaacabraham

Description

Duplicate #r lines appear in generated script files. Is this necessary? Can it cause problems?

Repro steps

Use the Entity Framework nuget package as a test case.

Expected behavior

I would expect to see the following in the generated script file:

#r "System.ComponentModel.DataAnnotations" 
#r "../../../packages/EntityFramework/lib/net45/EntityFramework.dll" 
#r "../../../packages/EntityFramework/lib/net45/EntityFramework.SqlServer.dll" 

Actual behavior

Paket generates a file as follows:

#r "System.ComponentModel.DataAnnotations" 
#r "System.ComponentModel.DataAnnotations" 
#r "../../../packages/EntityFramework/lib/net45/EntityFramework.dll" 
#r "../../../packages/EntityFramework/lib/net45/EntityFramework.SqlServer.dll" 

Known workarounds

Create your own references file.

Activity

  1. forki commented on Sep 4, 2017

    @forki
    Member
  2. isaacabraham commented on Sep 4, 2017

    @isaacabraham
    ContributorAuthor

    Maybe just a distinct rather than a hashset - need to maintain ordering I would imagine?

  3. forki commented on Sep 4, 2017

    @forki
    Member

    distinct is using a hashset ;-)

  4. isaacabraham commented on Sep 4, 2017

    @isaacabraham
    ContributorAuthor

    Yes but it maintains order? Does Hashset?

  5. forki commented on Sep 4, 2017

    @forki
    Member

    look at the code. it just checks if the the thing is already in the set. It doesn't retrieve things from the set. So yes order is maintained

  6. isaacabraham commented on Sep 4, 2017

    @isaacabraham
    ContributorAuthor

    ok sorry.

  7. matthid commented on Sep 4, 2017

    @matthid
    Member

    Yes use distinct @forki is only trying to confuse you ;)

  8. matthid commented on Sep 4, 2017

    @matthid
    Member

    It shouldn't actually cause any harm so up-for-grabs

  9. forki commented on Sep 4, 2017

    @forki
    Member
  10. isaacabraham commented on Sep 4, 2017

    @isaacabraham
    ContributorAuthor

    Very kind of you When I can get the solution to open on my PC maybe I'll do it otherwise yes up for grabs please

  11. added a commit that references this issue on Sep 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions