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

Too many targets #2388

Merged
merged 3 commits into from Jun 2, 2017

Conversation

Projects
None yet
2 participants
@0x53A
Contributor

0x53A commented Jun 2, 2017

No description provided.

@0x53A

This comment has been minimized.

Show comment
Hide comment
@0x53A

0x53A Jun 2, 2017

Contributor

Can someone please tell me why my commit fails with

InstallProcess.fs(167, 65): [FS0072] Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved. NuGetV2.fs(642, 22): [FS0001] This expression was expected to have type� 'PackageName' �but here has type� ''a * 'b'

but the following code works in fsi:

open System

[<System.Diagnostics.DebuggerDisplay("{ToString()}")>]
[<CustomEquality;CustomComparison>]
type PackageName =
| PackageName of string * string

    member this.GetCompareString() =
        match this with
        | PackageName(_,id) -> id

    override this.ToString() = 
        match this with
        | PackageName(name,_) -> name

    override this.Equals(that) = 
        match that with
        | :? PackageName as that -> this.GetCompareString() = that.GetCompareString()
        | _ -> false

    override this.GetHashCode() = hash (this.GetCompareString())

    interface System.IComparable with
       member this.CompareTo that = 
          match that with 
          | :? PackageName as that -> StringComparer.Ordinal.Compare(this.GetCompareString(), that.GetCompareString())
          | _ -> invalidArg "that" "cannot compare value of different types"

let GetTargetsFiles(targetFolder, (pkg : PackageName)) =
    let (PackageName(packageName, packageId)) = pkg
    0;;

? ¯\_(ツ)_/¯

Contributor

0x53A commented Jun 2, 2017

Can someone please tell me why my commit fails with

InstallProcess.fs(167, 65): [FS0072] Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved. NuGetV2.fs(642, 22): [FS0001] This expression was expected to have type� 'PackageName' �but here has type� ''a * 'b'

but the following code works in fsi:

open System

[<System.Diagnostics.DebuggerDisplay("{ToString()}")>]
[<CustomEquality;CustomComparison>]
type PackageName =
| PackageName of string * string

    member this.GetCompareString() =
        match this with
        | PackageName(_,id) -> id

    override this.ToString() = 
        match this with
        | PackageName(name,_) -> name

    override this.Equals(that) = 
        match that with
        | :? PackageName as that -> this.GetCompareString() = that.GetCompareString()
        | _ -> false

    override this.GetHashCode() = hash (this.GetCompareString())

    interface System.IComparable with
       member this.CompareTo that = 
          match that with 
          | :? PackageName as that -> StringComparer.Ordinal.Compare(this.GetCompareString(), that.GetCompareString())
          | _ -> invalidArg "that" "cannot compare value of different types"

let GetTargetsFiles(targetFolder, (pkg : PackageName)) =
    let (PackageName(packageName, packageId)) = pkg
    0;;

? ¯\_(ツ)_/¯

@0x53A 0x53A changed the base branch from master to hotfix Jun 2, 2017

@0x53A 0x53A closed this Jun 2, 2017

@0x53A 0x53A reopened this Jun 2, 2017

@matthid

This comment has been minimized.

Show comment
Hide comment
@matthid

matthid Jun 2, 2017

Member

Maybe we should do this in installmodel?

Member

matthid commented Jun 2, 2017

Maybe we should do this in installmodel?

@0x53A

This comment has been minimized.

Show comment
Hide comment
@0x53A

0x53A Jun 2, 2017

Contributor

Feel free, I'm going to sleep. =)

Contributor

0x53A commented Jun 2, 2017

Feel free, I'm going to sleep. =)

@matthid

This comment has been minimized.

Show comment
Hide comment
@matthid

matthid Jun 2, 2017

Member

;)

Member

matthid commented Jun 2, 2017

;)

@matthid matthid merged commit c2ec78e into fsprojects:hotfix Jun 2, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@matthid matthid referenced this pull request Jun 2, 2017

Closed

Cleanup recent changes. #2390

@0x53A

This comment has been minimized.

Show comment
Hide comment
@0x53A

0x53A Jun 2, 2017

Contributor

I made some changes in a file nugetv2.fs. Anything I additionally need to change for v3? @matthid

Contributor

0x53A commented Jun 2, 2017

I made some changes in a file nugetv2.fs. Anything I additionally need to change for v3? @matthid

@matthid

This comment has been minimized.

Show comment
Hide comment
@matthid

matthid Jun 2, 2017

Member

@0x53A No I don't think so. The names are a bit confusing there... Could probably need some refactoring

Member

matthid commented Jun 2, 2017

@0x53A No I don't think so. The names are a bit confusing there... Could probably need some refactoring

@0x53A 0x53A deleted the 0x53A:too-many-targets branch Jun 2, 2017

@matthid matthid referenced this pull request Jul 8, 2017

Merged

Fixes #2390 #2454

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