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

Paket 2.53.0 does not add packages named MyLib.MyLib to project #1531

Closed
jschroed opened this issue Mar 20, 2016 · 14 comments
Closed

Paket 2.53.0 does not add packages named MyLib.MyLib to project #1531

jschroed opened this issue Mar 20, 2016 · 14 comments
Labels

Comments

@jschroed
Copy link

I noticed an issue starting with Paket version 2.53.0. Paket is no longer adding one my libraries to my projects.

As far as I can tell, the only thing special about this package is that is has the same name before and after the period (e.g. MyLib.MyLib). Did something change in this version of Paket that could cause this?

The previous version 2.52.16 does not give me this issue. Also, version 2.53.0 works fine for all of my other packages.

I have the MyLib.MyLib package in my paket.references, paket.lock, and paket.dependencies. MyLib.MyLib is being downloaded into the packages directory. The only issue seems to be that it is no longer added to my csproj files.

@forki
Copy link
Member

forki commented Mar 20, 2016

Can you please try to create a repro case?
On Mar 20, 2016 8:16 PM, "jschroed" [email protected] wrote:

I noticed an issue starting with Paket version 2.53.0. Paket is no longer
adding one my libraries to my projects.

As far as I can tell, the only thing special about this package is that is
has the same name before and after the period (e.g. MyLib.MyLib). Did
something change in this version of Paket that could cause this?

The previous version 2.52.16 does not give me this issue. Also, version
2.53.0 works fine for all of my other packages.

I have the MyLib.MyLib package in my paket.references, paket.lock, and
paket.dependencies. MyLib.MyLib is being downloaded into the packages
directory. The only issue seems to be that it is no longer added to my
csproj files.


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#1531

@jschroed
Copy link
Author

Sure, I can try. I'll see if I can find a package on nuget.org that has the same behavior.

@forki
Copy link
Member

forki commented Mar 20, 2016

If not I will try to reproduce tomorrow.
On Mar 20, 2016 8:25 PM, "Steffen Forkmann" [email protected] wrote:

Can you please try to create a repro case?
On Mar 20, 2016 8:16 PM, "jschroed" [email protected] wrote:

I noticed an issue starting with Paket version 2.53.0. Paket is no longer
adding one my libraries to my projects.

As far as I can tell, the only thing special about this package is that
is has the same name before and after the period (e.g. MyLib.MyLib). Did
something change in this version of Paket that could cause this?

The previous version 2.52.16 does not give me this issue. Also, version
2.53.0 works fine for all of my other packages.

I have the MyLib.MyLib package in my paket.references, paket.lock, and
paket.dependencies. MyLib.MyLib is being downloaded into the packages
directory. The only issue seems to be that it is no longer added to my
csproj files.


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#1531

@forki
Copy link
Member

forki commented Mar 20, 2016

We also have integration tests that create new packages. We could copy and
tweak one of these.
On Mar 20, 2016 8:25 PM, "Steffen Forkmann" [email protected] wrote:

Can you please try to create a repro case?
On Mar 20, 2016 8:16 PM, "jschroed" [email protected] wrote:

I noticed an issue starting with Paket version 2.53.0. Paket is no longer
adding one my libraries to my projects.

As far as I can tell, the only thing special about this package is that
is has the same name before and after the period (e.g. MyLib.MyLib). Did
something change in this version of Paket that could cause this?

The previous version 2.52.16 does not give me this issue. Also, version
2.53.0 works fine for all of my other packages.

I have the MyLib.MyLib package in my paket.references, paket.lock, and
paket.dependencies. MyLib.MyLib is being downloaded into the packages
directory. The only issue seems to be that it is no longer added to my
csproj files.


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#1531

@jschroed
Copy link
Author

Okay, that might be best. I couldn't find any packages on nuget that have the same naming scheme. I can look into creating a custom package that has the same behavior but it would take some time.

I think it's an issue with the names but I could be way off. The only other guess I have is that it could an issue with the target framework.

@forki
Copy link
Member

forki commented Mar 20, 2016

Ok let's start with the name (but I don't really think it's it). I'll try
to reproduce.

Just to make sure it's not the target framework. Can you mail me the
package? Of course I will keep it private.
On Mar 20, 2016 9:12 PM, "jschroed" [email protected] wrote:

Okay, that might be best. I couldn't find any packages on nuget that have
the same naming scheme. I can look into creating a custom package that has
the same behavior but it would take some time.

I think it's an issue with the names but I could be way off. The only
other guess I have is that it could an issue with the target framework.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#1531 (comment)

@jschroed
Copy link
Author

I probably can't email the package since it's work related. I can try to create a similar package, or at least strip out all of the proprietary code.

@forki
Copy link
Member

forki commented Mar 20, 2016

You could unzip the package and replace all dlls with 0byte dlls with same
name and zip again. We could then even use it for repro if you allow
On Mar 20, 2016 9:57 PM, "jschroed" [email protected] wrote:

I probably can't email the package since it's work related. I can try to
create a similar package, or at least strip out all of the proprietary code.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#1531 (comment)

@jschroed
Copy link
Author

I can build Paket locally. That might be easier than me trying to get a package to you.

I can diff the two versions of Paket to at least narrow it down. Do you have any debugging that I could add? The verbose option of Paket wasn't any different between the two versions.

@jschroed
Copy link
Author

It seems that a change in the Utils.fs caused the issue.

Edit: it's this section. Old code:

    let startPos = path.LastIndexOf (sprintf "%s/" infix)

New code:

    let packagesPos = path.LastIndexOf "packages/"
    let startPos =
        if packagesPos >= 0 then
            path.IndexOf(sprintf "%s/" infix,packagesPos)
        else
            path.LastIndexOf(sprintf "%s/" infix)

@forki
Copy link
Member

forki commented Mar 20, 2016

Ok. Then you are probably very near to a solution. Can you give a whole
path that is now parsed wrongly?
On Mar 20, 2016 10:56 PM, "jschroed" [email protected] wrote:

It seems that a change in the Utils.fs caused the issue.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#1531 (comment)

@jschroed
Copy link
Author

Looks like the new code is getting "lib/net45" and the old code is just "net45".

EDIT: Here's something close to what I have for a path:

c:/users/username/workspace/myproject/packages/mylib.mylib/lib/net45/mylib.mylib.dll

@forki forki closed this as completed in b2e68f2 Mar 21, 2016
@forki forki added the bug label Mar 21, 2016
@forki
Copy link
Member

forki commented Mar 21, 2016

mhm a dll name ending in lib was already in the testcases. A package name ending in lib was not.
Should be fixed now. Sorry

@jschroed
Copy link
Author

No problem. Just glad that we caught this sooner rather than later.

Thanks @forki! Paket 2.53.2 works for us.

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

No branches or pull requests

2 participants