You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Ignore *.*projs that do not look like MSBuild projects #70
I have inherited a Git repository that contains a zreproj (no idea what it is) that is definitely not MSBuild. Paket fails to modify this file because it does not contain a Project node. Please ignore such files.
Restating #59 - if Packet.references was projectName.projectextension.Paket, you'd have a ready made solution to the problem without having to probe the file itself
... And .vbprojs and/or other random other languages that haven't even been invented yet :P
@bartelink I think you might have a point here. There are some projects out there that might have different reference requirements w.r.t. different target frameworks/platforms/profiles/whatever. A quick GitHub search reveals e.g. this, a project where there's one csproj for pcl, netcore45, sl4 etc.
My suggestion is to support both styles:
Paket uses Foo.csproj.paket for Foo.csproj if there is a .paket file, otherwise
Paket processes Paket.references
This gives you control and DRY at the same time:
Use Paket.references if you need to ensure all projs use the same references.
Use a project-specific .paket (.paket.references?) file if you need to be more specific for a certain project.
@agross Interesting. But implementing, documenting and supporting 2 code paths and the understanding of these is not free.
YAGNI?
If you are not sure that a significant number of people will actually use this DRYness capability, then the best first thing for me is clearly to have a suffix of .paket or .paket.references (I slightly prefer the first as the second is
a) unecessarily long and
b) constrains the file to only ever dealing with references)
I also think that in the case of a multi platform build, it may be that sopme platforms have reduced capability, which might trim the reference requirements and/or you might need to be able to specify some at the project level, and others at the dir level. I hope you're thinking "yuck, why do we have to bring all this into scope" now :)
Then if there's a demonstrated need and Issue logged asking for the DRYness, you respond with the request for a PR.
I also think that in the case of a multi platform build, it may be that sopme platforms have reduced capability, which might trim the reference requirements and/or you might need to be able to specify some at the project level, and others at the dir level. I hope you're thinking "yuck, why do we have to bring all this into scope" now :)
@agross@forki The impl reflects what I was trying to convey - the set should not be a union if there is a specific one. IOW there's now no way to say: "All will have package A and B, but xyz.csproj will also have C" in a DRY way. You say "they all have A and B" and then for xyz.csproj you say "this one has A and B and C". This means we can also say for xyz.xcsproj.WinPhone we will have "A and C".
In short, saying its lets one express all cases and that that's important even if it's not completely DRY.
I also think that in the case of a multi platform build, it may be that
sopme platforms have reduced capability, which might trim the reference
requirements and/or you might need to be able to specify some at the
project level, and others at the dir level. I hope you're thinking "yuck,
why do we have to bring all this into scope" now :)
Can you explain what you think should happen? If vbprojcsproj and fsproj files are the list of known extensions that the paket.references file triggers then processing of then:
I want to know if there was a problem loud and clear
I can put a xyz.proj.paket.references if for some reason a) it needs References/Content managed b) can't use a normal extension
Perhaps one could have a special case for proj-specific paket.references files - when empty, don't even parse the file (but I think that'd be a bad idea - making it empty should mean install/update should remove all Paket stuff from the file).
Or maybe have a .paket.ignore scheme that you can do to convey if a file using the standard extensions is not to be processed at all?
Currently there is no known extension list. From what I understand (haven't checked the code) Paket will load all *.*proj residing next to paket.references.
As it happens in my testing repos there are several foo.ilprojs next to my MSBuild csprojs. Those files are binary. I don't even know what they're used for nor what program generated them. Paket's ProjectFile.load fails for them because they're obviously not XML.
What I would like to see is a warning message: "Could not load foo.ilproj, Paket will not attempt to add references" and be done with it. A similar message could be printed if the proj is XML, but does not contain the MSBuild <Project> element that we try to select.
Mhm how about restricting the list to csproj, fsproj and vbproj files?
On Sep 14, 2014 12:36 PM, "Alexander Groß" [email protected] wrote:
Currently there is no known extension list. From what I understand
(haven't checked the code) Paket will load all _._proj residing next to
paket.references.
As it happens in my testing repos there are several foo.ilprojs next to
my MSBuild csprojs. Those files are binary. I don't even know what
they're used for nor what program generated them. Paket's ProjectFile.load
fails for them because they're obviously not XML.
What I would like to see is a warning message: "Could not load foo.ilproj,
Paket will not attempt to add references" and be done with it. A similar
message could be printed if the proj is XML, but does not contain the
MSBuild element that we try to select.
—
Reply to this email directly or view it on GitHub #70 (comment).
@agross If the software is in any doubt, I want it to stop by default. I don't want to discover 20 minutes into diagnosing a broken build that paket install actually failed.
It doesnt have to stop processing immediately though ; Maybe it is a separate ERRORLEVEL, but I def want to stop builds in all normal circumstances.
Then you can filter the errors as you see fit ... then you'd need to start putting in googleable 'Error Code PAK001 I know you definitely don't want me to look at %s"
@agross Sorry to disagree here, but I think it's a good thing to explicitly opt-in for supported *.proj types.
I know of interesting project types, such as pyproj, booproj, sqlproj, dbproj, psproj, njsproj and many more (I intentionally left out the large set of C/C++ projects here).
There are so many project types out there, which might interfere with Paket because someone has different project types / languages in his repo. I know of library devs providing APIs in half-a-dozen langs. I'd still vote for explicitly going for a well-defined set of *.projs.
@bartelink I propose a hardwired (yet well documented) set of projs Paket will support. That is, Paket will only touch certain projs "by design". No user interaction or overriding.
My proposal is that Paket should support only vbproj, csproj and fsproj for the time being.
@forki Hate to bring up a long dead issue, but I'm working on an IronPython project that uses a *.pyproj project file extension. Has there been any other movement/discussion on alternative project file extensions? I'd like to be able to have paket update this project file, but right now, I have to constantly change the extension back and forth to do so, it seems.
Just grep for fsproj and csproj in the repo here and add your stuff in a
PR. Will be fastest way ;-)
Am 02.11.2017 20:54 schrieb "Michael Szul" <[email protected]>:
Activity
agross commentedon Sep 9, 2014
ProjectFile.fs, line 101
bartelink commentedon Sep 9, 2014
Restating #59 - if
Packet.referenceswasprojectName.projectextension.Paket, you'd have a ready made solution to the problem without having to probe the file itself... And
.vbprojs and/or other random other languages that haven't even been invented yet :Pagross commentedon Sep 10, 2014
@bartelink I think you might have a point here. There are some projects out there that might have different reference requirements w.r.t. different target frameworks/platforms/profiles/whatever. A quick GitHub search reveals e.g. this, a project where there's one csproj for pcl, netcore45, sl4 etc.
My suggestion is to support both styles:
Foo.csproj.paketforFoo.csprojif there is a.paketfile, otherwisePaket.referencesThis gives you control and DRY at the same time:
Paket.referencesif you need to ensure all projs use the same references..paket(.paket.references?) file if you need to be more specific for a certain project.bartelink commentedon Sep 10, 2014
@agross Interesting. But implementing, documenting and supporting 2 code paths and the understanding of these is not free.
YAGNI?
If you are not sure that a significant number of people will actually use this DRYness capability, then the best first thing for me is clearly to have a suffix of
.paketor.paket.references(I slightly prefer the first as the second isa) unecessarily long and
b) constrains the file to only ever dealing with references)
I also think that in the case of a multi platform build, it may be that sopme platforms have reduced capability, which might trim the reference requirements and/or you might need to be able to specify some at the project level, and others at the dir level. I hope you're thinking "yuck, why do we have to bring all this into scope" now :)
Then if there's a demonstrated need and Issue logged asking for the DRYness, you respond with the request for a PR.
agross commentedon Sep 10, 2014
Two code paths are fine with me. Most users will use
Paket.referencesanyway.When I used ripple I remember I wanted a project-specific dependencies file for one project. So YAGNI is ruled out from my point of view :P
I don't buy the reduced capability argument. All platforms today that I know of have support for long file names.
Foobar.csproj.paketworks for me.forki commentedon Sep 10, 2014
same in NServiceBus. It's both needed
2014-09-10 13:33 GMT+02:00 Alexander Groß [email protected]:
bartelink commentedon Sep 10, 2014
Fair enough then, if it's 100% needed, it's 100% needed :)
Was not talking about long filenames being a problem from the perspective of the OS (though I could tell you a story or two about the number
260:P)Was saying:
abc.csproj.paket.referenceswould be slightly surprising if it referred also to platform specific rulesabc.csproj.paketcould more reasonably grow to encompass platform specific rulesagross commentedon Sep 10, 2014
On the other hand,
abc.csproj.paket.referencesis easier to transform fromPaket.referencesand vice versa.bartelink commentedon Sep 10, 2014
@agross True dat, had missed that point, pretty neat.
But you mean
abc.csproj.Paket.referencessurely :P (see it needs to be all lowercase!)ignore *.*projs that do not look like MSBuild projects - references #70
forki commentedon Sep 10, 2014
@bartelink you won. I just converted all files to lowercase.
bartelink commentedon Sep 10, 2014
@forki Right, I better accept my masterful victory with dignity then :P
Will hopefully get to do doc review / consistency check later
bartelink commentedon Sep 10, 2014
@agross @forki The impl reflects what I was trying to convey - the set should not be a union if there is a specific one. IOW there's now no way to say: "All will have package A and B, but xyz.csproj will also have C" in a DRY way. You say "they all have A and B" and then for
xyz.csprojyou say "this one has A and B and C". This means we can also say forxyz.xcsproj.WinPhonewe will have "A and C".In short, saying its lets one express all cases and that that's important even if it's not completely DRY.
forki commentedon Sep 10, 2014
Ah what?
On Sep 10, 2014 5:24 PM, "bartelink" [email protected] wrote:
6 remaining items
bartelink commentedon Sep 14, 2014
Can you explain what you think should happen? If
vbprojcsprojandfsprojfiles are the list of known extensions that thepaket.referencesfile triggers then processing of then:xyz.proj.paket.referencesif for some reason a) it needs References/Content managed b) can't use a normal extensionPerhaps one could have a special case for proj-specific
paket.referencesfiles - when empty, don't even parse the file (but I think that'd be a bad idea - making it empty should meaninstall/updateshould remove all Paket stuff from the file).Or maybe have a
.paket.ignorescheme that you can do to convey if a file using the standard extensions is not to be processed at all?agross commentedon Sep 14, 2014
Currently there is no known extension list. From what I understand (haven't checked the code) Paket will load all
*.*projresiding next topaket.references.As it happens in my testing repos there are several
foo.ilprojs next to my MSBuildcsprojs. Those files are binary. I don't even know what they're used for nor what program generated them. Paket'sProjectFile.loadfails for them because they're obviously not XML.What I would like to see is a warning message: "Could not load foo.ilproj, Paket will not attempt to add references" and be done with it. A similar message could be printed if the
projis XML, but does not contain the MSBuild<Project>element that we try to select.forki commentedon Sep 14, 2014
Mhm how about restricting the list to csproj, fsproj and vbproj files?
On Sep 14, 2014 12:36 PM, "Alexander Groß" [email protected] wrote:
agross commentedon Sep 14, 2014
I'd prefer if we try and log when we fail. That's more flexible than whitelisting, IMHO.
ilkerde commentedon Sep 14, 2014
@forki +1 for explicit opt-in of supported proj files.
bartelink commentedon Sep 14, 2014
@agross If the software is in any doubt, I want it to stop by default. I don't want to discover 20 minutes into diagnosing a broken build that
paket installactually failed.It doesnt have to stop processing immediately though ; Maybe it is a separate
ERRORLEVEL, but I def want to stop builds in all normal circumstances.Then you can filter the errors as you see fit ... then you'd need to start putting in googleable 'Error Code PAK001 I know you definitely don't want me to look at %s"
bartelink commentedon Sep 14, 2014
Maybe the extensions list should be a defaulting arg for
installandupdatewhich is set to vb/cs/fs proj (and @agross can put in +_._proj;-*.ilproj`)ilkerde commentedon Sep 14, 2014
@agross Sorry to disagree here, but I think it's a good thing to explicitly opt-in for supported *.proj types.
I know of interesting project types, such as pyproj, booproj, sqlproj, dbproj, psproj, njsproj and many more (I intentionally left out the large set of C/C++ projects here).
There are so many project types out there, which might interfere with Paket because someone has different project types / languages in his repo. I know of library devs providing APIs in half-a-dozen langs. I'd still vote for explicitly going for a well-defined set of
*.projs.bartelink commentedon Sep 14, 2014
@ilkerde So, can you clarify. You want a hardwired set of e.g. 8 with/without an ability to remove 1 / add items / replace the entire set?
Or do you want a commandline parameter with a default value like my suggestion which allows you to override it ?
Or a syntax element in the deps file that specifies a seach pattern?
Best to give a clear picture of what you consider should happen?
ilkerde commentedon Sep 15, 2014
@bartelink I propose a hardwired (yet well documented) set of projs Paket will support. That is, Paket will only touch certain projs "by design". No user interaction or overriding.
My proposal is that Paket should support only
vbproj,csprojandfsprojfor the time being.forki commentedon Sep 16, 2014
we now only support vbproj, csproj and fsproj - is here anything left?
agross commentedon Sep 16, 2014
Let's see how it works out in practice.
szul commentedon Nov 2, 2017
@forki Hate to bring up a long dead issue, but I'm working on an IronPython project that uses a *.pyproj project file extension. Has there been any other movement/discussion on alternative project file extensions? I'd like to be able to have paket update this project file, but right now, I have to constantly change the extension back and forth to do so, it seems.
forki commentedon Nov 2, 2017