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

Licensing Issue #563

Closed
paulushub opened this issue Aug 25, 2019 · 46 comments · Fixed by #567
Closed

Licensing Issue #563

paulushub opened this issue Aug 25, 2019 · 46 comments · Fixed by #567

Comments

@paulushub
Copy link
Contributor

Not a bug report. Was trying to fork this library and spin it for different uses (my own is currently big and will only grow bigger!, needed something smaller to start with) but had issues with the licensing.
@mrbean-bremen @erdomke @atifaziz

The Fizzler library is licensed under LGPL3+GPL3
https://github.com/vvvv/SVG/blob/master/Source/External/Fizzler/Selector.cs

Can the combined sources be licensed under MS-PL?
The original sources on Codeplex and under MS-PL never included the CSS library.

@gvheertum
Copy link
Member

Having a copy of the Fizzler sources in the SVG library is perhaps not the best way to go and might indeed be a problem. I'm not even sure if we mention the Fizzler component anywhere, same goes for the ExCss code that is also included in the External folder. I believe the LGPL might give a bit more room to use the component in the SVG project, so we should try to match the LGPL at least (GPL is more restrictive so preferably we should go for the LGPL).

A quick research learned me that as long as you provide the sources and license (which we can) and attribute the author/original project (which we should) you can include it in your application and you are not required to release your other code (yours or the SVG code) under the same license. It gets more difficult if the code cannot be easily separated (the LGPL source is altered to communicate with SVG sources or your sources, that might require you to license those parts as LGPL too). Many applications use these kind of components and often you see these mentioned in the about/splash dialogs or documentation including their license.

My guess is the safest bet is to extract the libs in the external folder to sub-projects in the SVG solution and compile them to separate binaries with their own licensing (and include this information in the SVG distribution). Another option is to reference the projects as NuGet packages, this will steer us more away from any legal complications.

Obligatory "I am not a lawyer", but the above is my understanding. I'm not sure if anybody else is willing or able to do some more research (or is comfortable with this subject), but if you want I can do some more research next week.

I think it's very interesting (and good) that you found this license issue and I am curious on how to cope with this.

@gvheertum
Copy link
Member

https://opensource.org/licenses/LGPL-3.0
Article 4 states:

You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following:

This means that we can put any license on our code if we allow people to replace the Library (in this case the Fizzler library) and not obstruct access to the code. Not obstructing is done by having the sources available, the replacement part might need some attention. Based on this and some other reading I think we should move the Fizzler code into a separate assembly and bundle that with a separate license file and make a mention in the documentation that we use this library (which in my opinion is also fair to the authors of that project). If we allow users to replace the assembly with their own rolled version I suppose we are in the clear.

Is this something that is feasible? This might mean that we not only provide the SVG.dll but also provide the two external libraries with their own dll. This might also bring an advantage, because developers already using the given libraries will only have a single copy in their application of these libraries since there is no longer a copy embedded in the SVG library.

@mrbean-bremen
Copy link
Member

@gvheertum - thanks for digging into this. I actually hadn't noticed before that there is code with another license in here, and I think your suggestions are quite sensible (e.g. bundling the external libraries into extra assemblies, and mention them, together with their license, in the license text).
This has to be decided by @tebjan, of course, but the current state is obviously not satisfying, so something has to be done here, in my opinion.

@gvheertum
Copy link
Member

gvheertum commented Aug 25, 2019

@mrbean-bremen No problem, this topic directly caught my attention. I also never noticed the external components, perhaps because they are put in a separate folder and are not change heavy. Also the ExCss was in the SVG namespace which also obfuscated the fact that it's an external component a bit more). This topic had my attention since I had to do the license dance in the past for business purposes, so this directly stood out to me.

The sources on internet are a bit "confusing" with regard to licensing for static linking or including copies of code in your application, but the common opinion seems to be that it's safer to include it as linked (and thus replaceable) component. The problem is that the licensing issues are often on the point of derivative work and the definition of derivative can be quite ambiguous for a lot of people (if you include a copy, is it a derivative, and what if you inherit from the class, etc). And law-speak can be a bit intimidating for a non-law-person, especially if it's not your native language.

I'll see if I can do some more research next week, because it's still not 100% "clear" to me (and somehow this is within my interests so I want to get the full story). Hopefully I can find some legal statements written by lawyers/experts, because most information is prefixed with the well known IAmNotALawyer abbreviation.

With regard to the changes:
I think moving the Fizzler lib can be done quite easily, the namespaces are not changed and from what I see the classes themselves are not altered. There is a NuGet available (https://github.com/atifaziz/Fizzler), which is .NET standard 1.0 compatible, so perhaps linking it as a NuGet might be an even better way to go since their NuGet can provide it's own license. Since the namespaces are not changed (and the library seems to be quite stale), the replacement of the included sources with a nuget package should not give problems. We can do a code comparison on the current Fizzler repo against the code in the SVG project, but I think they are equal.

With regard to ExCss, this also seems to be a GitHub project (https://github.com/TylerBrinks/ExCSS), and is licensed under an MIT license and seems to also have a NuGet package available (.NET standard 1.1). For MIT you only seem to need to attribute and provide the license (did not yet do a full research, only the license text on the repo). Only thing we might need to do, is add the license/copyright on the ExCss part, since from what I see now there is no licensing information on that part in the SVG lib. But like the Fizzler repo it might be nicer to reference the project via the NuGet or also include as a separate assembly with the correct licensing, this might take away some of the possible issues. MIT allows you to do a lot more, but we might still need to find a way to handle this fully right.

The good thing about referencing them as NuGet libraries is that the end-user needs to accept the license per included package (so the MS-PL for SVG, MIT for ExCSS and LGPL for Fizzler). This puts the end responsibility with the consuming party (this ofcourse is limited in a sense that we cannot just link everything an ignore underlying licenses, but LGPL and MIT allow including the packages as separate linked libraries) and no longer with the SVG team.

On a side note, I think it would be nice to mention these dependent projects one way or another anyway. I think it would be a nice gesture to mention these projects, since they are helping the SVG team to build a very nice project. :) I always get happy myself when I see mentions of projects I contributed to in a list of referenced/used projects, so perhaps this also goes for these authors.

@gvheertum
Copy link
Member

On a different note: Although my walls-of-text might suggest otherwise, I am really not a lawyer 😉

Legal stuff and writing long texts is kind of a hobby 🤓

@H1Gdev
Copy link
Contributor

H1Gdev commented Aug 26, 2019

Previously, when I checked issue, I considered changing Fizzler to reference from <PackageReference>.
But I gave up because Fizzler seemed does not support .NetFramework 3.5.

@wieslawsoltes
Copy link
Contributor

Seems like Fizzler supports .NETStandard 1.0 and .NETStandard 2.0:
https://www.nuget.org/packages/Fizzler
https://github.com/atifaziz/Fizzler#fizzler-net-css-selector-engine

@gvheertum
Copy link
Member

gvheertum commented Aug 26, 2019

@H1Gdev, good point, I keep forgetting the 3.5 compatibility. .NET standard only works from .NET 4.5 and up (https://github.com/dotnet/standard/blob/master/docs/versions.md) so you are quite right that just referencing the package might not cut it.

We could post a PR on the Fizzler repo for 3.5 compatibility (the code is that straightforwarded I don't think 3.5 compatibility won't be that much of an issue) and ask for a new Nuget after the changes have been merged. Another option could be to fork that repo (under the LGPL license) and reference that one. If needed we can pack a new Nuget (possibly with a different naming like SVG.Fizzler). This way we can keep the original authors and license. Possible changes/additions to the SVG.Fizzler package will automatically be correctly licensed and attributed.

Shall I give that a try by forking and trying to get something published?

@wieslawsoltes Unfortunately .NETStandard 1.0 requires .NET >= 4.5, so it will break the 3.5 compatibility (but that one also breaks my Mac workflow and I often have to remove the 3.5 target because otherwise my IDE won't work with the SVG lib). I think we can discuss dropping 3.5 support in the future, but that is something I cannot decide.

@mrbean-bremen
Copy link
Member

Shall I give that a try by forking and trying to get something published?

I think that would be a great help. It would be easier to drop 3.5, of course, but given that it still will be supported for a few years, that is probably not a good idea.
I personally can't help much here (apart from writing random comments now and then...) due to having almost no free time at least for another couple of weeks.
It would help to have @tebjan's opinion here, as he is to decide the course of action ultimately.
Ping @tebjan :)

@gvheertum
Copy link
Member

@mrbean-bremen, I'll see what I can do. Will be continued.

Thanks for looking up the support-cycle for .NET 3.5, I did not expect it to be supported until 2023 in the mainstream (and 2028 extended). I agree that dropping the support would not be a viable option for now.

@H1Gdev
Copy link
Contributor

H1Gdev commented Aug 26, 2019

.Net has various frameworks and versions, so it is difficult to maintain compatibility... 😫

@paulushub
Copy link
Contributor Author

Well, other options are not being discussed so I will try to suggest some here:

  1. Contact the author of the Fizzler library and explain the situation. He might grant this project a license waiver.
  2. Rework the CSS selection codes. The main CSS engine is the ExCSS library with no license compatibility issue. The selection and integration into SVG library could be easy to handle. AngleSharp, HtmlAgilityPack have similar CSS selection implemented for their own projects. Fizzler was to fill the selection need that existed before in the HtmlAgilityPack.

These could reduce integration issues for projects already using this library.

@gvheertum
Copy link
Member

@paulushub, you are right we directly seemed to jump to keeping the license and isolate the component. Regarding you suggestions:

  1. Could definitely be an option, but then we still need to mention/log that somewhere, because if people go through the code they still find the external component and will also see after some research that the license is (L)GPL. We can ask the author to reconsider the license as a whole.
  2. Could also be an option, downside to "rewiring" code is that the new author still might be tempted to use logic from the other Fizzler project and that might still be an issue with regard to copyright and stuff.

I think the cleanest option is to isolate the component and refer to that isolated component, this allows others to also replace the given component. Bundling the components under their own license will not be an issue going forward.

The ExCss is less of a problem, but from a personal view I would also suggest putting it in a different package and license that package under the corresponding license and attribute the original authors. Having copies of code without any attribution (regardless whether required by the license) feels a bit "meh" to me. I also kinda dislike having copies of publicly available libraries in another library, because this means duplication and will cut you of from updates/patches of that code (since the copy will completely obfuscate the relation/connection).

So going forward I think removing the external copies might be the safest, nicest and most sustainable option. But then again, that is just my humble opinion and I am not one to make these decisions for the SVG team.

@atifaziz
Copy link

Fizzler 1.0 supports .NET Framework 3.5 (even 2.0!) so if you want to take a binary dependency via the NuGet package then you should be good with that version. You will have nothing to gain by using the absolute latest version of the package. Versions that came after 1.0 dropped support for .NET Framework 2.0 (in 1.1) and .NET Framework 3.5 (in 1.2) but there were no code changes or new features introduced otherwise. The primary reason for dropping support was to ease my own burden by avoiding build matrix complexity while waiting for tooling to mature. At the same time, I felt that the .NET Framework 3.5 target could always be added back later and maintained in a 1.x branch even if the project moves ahead in an incompatible way.

Source-embedding scenarios (like this one) are getting more and more impractical to support with C# moving quicker as a language. It means that if Fizzler wants to, for example, start using C# 8 then it will probably create an even bigger issue for an embedding project (such as this one) that may not be at liberty to do the same. Taking a dependency package therefore affords more flexibility in the longer run.

(and the library seems to be quite stale)

I'd like to think mature. 😉

On a side note, I think it would be nice to mention these dependent projects one way or another anyway. I think it would be a nice gesture to mention these projects, since they are helping the SVG team to build a very nice project. :) I always get happy myself when I see mentions of projects I contributed to in a list of referenced/used projects, so perhaps this also goes for these authors.

Kudos for the attitude and thanks to everyone taking the time to pay attention to the details of the license. It wasn't chosen willy-nilly or without thought but it wasn't chosen to be a hindrance or a headache either. LGPL is fairly liberal.

@paulushub
Copy link
Contributor Author

paulushub commented Aug 26, 2019

  1. GitHub allows you to display multiple licenses and many projects do. If granted waiver, it will be under your current/granted license with copyright notice of the author.
  2. In actual fact, Fizzler is used in a limited number of places in the SVG, you can check. Using logic from other projects is the whole concept of open source, just give credit where it is due even with Stock-overflow code snippets.

I perfectly understand your position. There are many reasons one will kept a separate copy of third-party libraries. As already coming up in the discussions, the third-party library might break compatibility especially with .NET, where programmers are easily crazy about using the latest syntax sugar! Keeping a local copy itself is not an issue but the third-party libraries must be acknowledged.
If you fork it, there must be some sort of guarantee that it is going to be maintained.
There is no single best path, but the core team members could weigh the options and decide on what is feasible going forward. My suggestions were to expand the scope of your discussions.

My interest in this project was because it is a single small dll, but I was curious about how current the third-party libraries are, leading me to the license issue. My own SVG library supports GDI+, WPF and will soon expand to support SkiaSharp etc.

@gvheertum
Copy link
Member

gvheertum commented Aug 26, 2019

@atifaziz, thanks for chiming in 😄

Fizzler 1.0 supports .NET Framework 3.5 (even 2.0!) so if you want to take a binary dependency via the NuGet package then you should be good with that version.
Thanks for that detail. This however means that we need to do some tinkering in our config to be able to support both 3.5 and core, since the 3.5 package most likely is not going to work on the .net core versions.

So maybe I'll try to make a core-compatible version of Fizzler 1.0.0 and publish that one. Thanks for warning us that using a newer version will gain us nothing, so I guess making 1.0.0 working on Core might be our best bet for now.

Source-embedding scenarios (like this one) are getting more and more impractical to support with C# moving quicker as a language. It means that if Fizzler wants to, for example, start using C# 8 then it will probably create an even bigger issue for an embedding project (such as this one) that may not be at liberty to do the same. Taking a dependency package therefore affords more flexibility in the longer run.

True, unless you are moving between the various .net "types". Moving between versions within the same type of framework (e.g. 3.5 to 4.5) the packages most likely will not break if they stay on the older version. The SVG project recently did a migration to make the whole package .NET Core compatible (and working on Linux/Mac), so that means that if we had used the 3.5 package we kind of had a compatibility issue.

(and the library seems to be quite stale)

I'd like to think mature. 😉

Hahaha, that's what I meant, couldn't come up with the right word. No disrespect, but just unfortunate wording 😉

Kudos for the attitude and thanks to everyone taking the time to pay attention to the details of the license. It wasn't chosen willy-nilly or without thought but it wasn't chosen to be a hindrance or a headache either. LGPL is fairly liberal.

True, and I think it'll be no problem to link with that license. And I think that if we make changes to that part of the sources there is no issue with putting them under the same LGPL license.

@gvheertum
Copy link
Member

1. GitHub allows you to display multiple licenses and many projects do. If granted waiver, it will be under your current/granted license with copyright notice of the author.

Good point, but that needs "proof" etc. Also the author has to make sure that the waiver is limited to this project and not derivatives, otherwise the MS-PL will grant full use of the newly embedded sources (and kinda makes the Fizzler component available for everybody under a MS-PL license if not worded/described correctly).

2. In actual fact, Fizzler is used in a limited number of places in the SVG, you can check. Using logic from other projects is the whole concept of open source, just give credit where it is due even with Stock-overflow code snippets.

Isn't the credit part the also not part of this issue (at least for me it is). Rewriting the logic might also involve re-testing some of the code (and if it's not under test, create new tests).

I perfectly understand your position. There are many reasons one will kept a separate copy of third-party libraries. As already coming up in the discussions, the third-party library might break compatibility especially with .NET, where programmers are easily crazy about using the latest syntax sugar! Keeping a local copy itself is not an issue but the third-party libraries must be acknowledged.

Having copies embedded in your own sources is, at least for me, not the best way to secure a copy. In the past I just forked the libraries I needed and rolled my own assemblies. By having the fork you can keep track of changes/security issues. This will remove the dependency on the original author for updates and will remove the risks that might occur if the packages are somehow delisted.

You can also get the forked project linked into your own solution (for easier reference), so I guess there are plenty technical solutions to fix this. But I don't think that's the problem here since everybody participating has some way to work with this in his toolbelt 😉

This is a interesting subject on it's own, because maintaining compatibility, versions and updates when referencing external tooling is something that is quite difficult to get fully right.

If you fork it, there must be some sort of guarantee that it is going to be maintained.

True, but as long as you bundle it as separate assembly, people can replace it with whatever version of the component they want. With the current approach this is not possible at all since the sources are put inside the SVG assembly.

There is no single best path, but the core team members could weigh the options and decide on what is feasible going forward. My suggestions were to expand the scope of your discussions.

I see that now, that's really appreciated!

My interest in this project was because it is a single small dll, but I was curious about how current the third-party libraries are, leading me to the license issue. My own SVG library supports GDI+, WPF and will soon expand to support SkiaSharp etc.

Nevertheless I think you did a great find and shook us awake, so thanks for that! The single DLL is nice, but since the uprising of .NET core your binary folder is likely to be flooded with assemblies anyway. I personally don't really mind multiple assemblies, better yet, the separation of components makes my inner developer very happy.

@tebjan
Copy link
Contributor

tebjan commented Aug 26, 2019

Wow, very interesting issue. I wasn't aware of that, since I never questioned the license when I forked the library from codeplex... I'll dig into it after work tonight.

@atifaziz
Copy link

atifaziz commented Aug 26, 2019

The SVG project recently did a migration to make the whole package .NET Core compatible (and working on Linux/Mac), so that means that if we had used the 3.5 package we kind of had a compatibility issue.

Fortunately Fizzler is mostly a parser building run-time selection via an abstract generator so the code uses very basic types. Version 1.0.0 is actually binary-compatible with .NET Framework 3.5 and Core, provided that you are comfortable with seeing an NU1701 warning. You can test this with the following steps:

git clone --single-branch https://github.com/atifaziz/Fizzler.git
cd Fizzler
git checkout -b test-net35-pkg 19c941905a6f547c8ddecfce641700df373f959d
dotnet remove tests reference src/Fizzler.csproj
dotnet add tests package Fizzler -v 1.0.0
dotnet test tests

The output from the last step, the test, was as follows on my machine:

A:\Fizzler\tests\Fizzler.Tests.csproj : warning NU1701: Package 'Fizzler 1.0.0' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.0'. This package may not be fully compatible with your project.
A:\Fizzler\tests\Fizzler.Tests.csproj : warning NU1701: Package 'Fizzler 1.0.0' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.0'. This package may not be fully compatible with your project.
Test run for A:\Fizzler\tests\bin\Debug\netcoreapp2.0\Fizzler.Tests.dll(.NETCoreApp,Version=v2.0)
Microsoft (R) Test Execution Command Line Tool Version 16.0.1
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...

Total tests: 220. Passed: 220. Failed: 0. Skipped: 0.
Test Run Successful.
Test execution time: 1.0314 Seconds

So all 220 tests passed using version 1.0 targeting .NET Framework 3.5 while running under a .NET Core 2.0 application!

That said, I am happy to add back the .NET Framework 3.5 target if someone is willing to help with adjusting the scripts and CI in a maintainable way; thus a PR would be welcome. You are still free to fork the project but I think the effort would be the same.

@mrbean-bremen
Copy link
Member

Note for @tebjan: the external libraries have not been in the original library, they have been introduced with CSS support in this commit.

@H1Gdev
Copy link
Contributor

H1Gdev commented Aug 30, 2019

I report ExCSS, too.

  • Base version of ExCSS embedded in SVG library seems to be 2.0.3.
  • But, I think that it has been changed because behavior with invalid values is different.
  • ExCSS does not support .NetFramework 3.5.
  • Package has been changed in PR Rename namespace for ExCSS #409.

H1Gdev added a commit to H1Gdev/SVG that referenced this issue Aug 30, 2019
- version 1.1.0.
- get from NuGet.
- fixes svg-net#563.
@gvheertum
Copy link
Member

I report ExCSS, too.

* Base version of `ExCSS` embedded in `SVG` library seems to be [2.0.3](https://www.nuget.org/packages/ExCSS/2.0.3).

* But, I think that it has been changed because behavior with invalid values is different.

* `ExCSS` does not support .NetFramework 3.5.

* Package has been changed in PR #409.

Mmm, we can fork the 2.0.3 version and append our changes (from #409) and ship it as a separate nuget or move the ExCSS to a separate project within the SVG solution and put a project reference between the both of them. In both cases we can put a separate license on the ExCSS assembly package or project.

@H1Gdev
Copy link
Contributor

H1Gdev commented Aug 31, 2019

@gvheertum

we can fork the 2.0.3 version

As far as I confirmed, version 2.0.3 source code did not exist on Github...

@gvheertum
Copy link
Member

In that case, we might consider moving our version to a separate project/repo and publish it as Svg.ExCSS, this will also prevent confusion and accidental package conflicts with existing ExCSS.

@mrbean-bremen
Copy link
Member

I just checked the history, and there have been a number of fixes added (apart from the namespace change) that could be added to the original library. As a first step, I would try to make a PR with these changes (leaving out the namespace change and the formatting stuff), or probably create an issue in ExCss first to check if we could get a new release if we added these changes. Provided that works out, I would revert the namespace change (or probably add an respective alias where needed) and use the library from NuGet same as with Fizzler.

If that doesn't work out, I would agree with @gvheertum - create a separate fork/repo with the changes, probably under the vvvv group - @tebjan, would that be possible?

mrbean-bremen pushed a commit that referenced this issue Aug 31, 2019
H1Gdev added a commit to H1Gdev/SVG that referenced this issue Sep 3, 2019
@mrbean-bremen
Copy link
Member

Reopen, as the ExCSS part is not resolved yet.

@mrbean-bremen
Copy link
Member

@H1Gdev, @gvheertum : is any of you working on this (e.g.the ExCSS part)? I'm still short on time...

@gvheertum
Copy link
Member

@mrbean-bremen nope, unfortunately not. My time also got cut a bit short due to starting a new job. I hope to be able to do something regarding this ticket next week.

Good for pinging for a reminder!

@H1Gdev
Copy link
Contributor

H1Gdev commented Sep 12, 2019

@mrbean-bremen

nothing.

create a separate fork/repo with the changes, probably under the vvvv group

If you first create repo, I can do something.

@mrbean-bremen
Copy link
Member

@H1Gdev - I'm actually more in favor of the other option, e.g. adding our changes as a PR to ExCSS (see my comment above) and handle it like Fizzler.
Anyway, if going the other way, @tebjan or someone else from the vvvv team has to decide about the repo and create it - I don't have the permissions.

@H1Gdev
Copy link
Contributor

H1Gdev commented Sep 12, 2019

@mrbean-bremen

I'm actually more in favor of the other option, e.g. adding our changes as a PR to ExCSS (see my comment above) and handle it like Fizzler.

I wrote it in #563 (comment).
Then we need to contact author about operational status of old version (2.0.3).

@mrbean-bremen
Copy link
Member

mrbean-bremen commented Sep 13, 2019

I think we will wait a few days if there is any response to the issue in ExCSS. If not, we have to assume that the project is dead, and we can decide about an own fork.

@mrbean-bremen
Copy link
Member

Ok, the project is obviously dead. There is a more recent fork with .NETStandard support. I think we have these options:

  • leave it as is embedded in the code (the license permits this, as far as I understand)
  • make an own fork and reference it
  • use fork by @HockeyJustin mentioned above (if possible)

Any thoughts?

@H1Gdev
Copy link
Contributor

H1Gdev commented Oct 18, 2019

* use fork by @HockeyJustin mentioned above (if possible)

I think this idea is more ideal, but expenses more.

@JsAndDotNet
Copy link

Just to confirm, I do look after ExCss_Core. @TylerBrinks did such good work, it's a shame the original project appears dormant.

If you need changes to the ExCss_Core, please fork it, make the updates (including test cases), make sure nothing else is broken, then create a PR. I will update and release to NuGet.

@mrbean-bremen
Copy link
Member

mrbean-bremen commented Oct 18, 2019

Thanks, @HockeyJustin!
One question: your package is targeted at NetStandard only, while SVG.Net has multiple targets (starting with .NET 3.5). As far as I understand, ExCSS_Core will not work with these other targets (correct me if I'm wrong). Would it be ok in this case to make your project multi-target?

@tebjan
Copy link
Contributor

tebjan commented Oct 18, 2019

@mrbean-bremen .NET Standard is compatible with all targets, it's a subset of Core and FW. So in theory SVG.NET could be released as Standard only and be compatible with all targets of the project that reference it.

@gvheertum
Copy link
Member

gvheertum commented Oct 18, 2019 via email

@mrbean-bremen
Copy link
Member

Thanks, @tebjan! @gvheertum - I guess we have to try it out...

@tebjan
Copy link
Contributor

tebjan commented Oct 18, 2019

right, 3.5 wasn't aware of .NET standard. this might help: https://markheath.net/post/supporting-net-standard-and-net-35

@mrbean-bremen
Copy link
Member

Ok, I checked this out, and it basically says that we need multi-target projects. This is what we currently do in SVG.NET, and if I understand that correctly, we can do the same in ExCSS_Core (provided the code is compatible). ExCSS_Core is currently targeted at netstandard2.0, which is comaptible with .NET >= 4.6.1, so we may add a 3.5 target if possible (which should also cover later .NET versions.
Is this correct?

@JsAndDotNet
Copy link

@mrbean-bremen - Agree ExCss_core could not be used for .Net 3.5. Ref: https://weblog.west-wind.com/posts/2019/Feb/19/Using-NET-Standard-with-Full-Framework-NET

@mrbean-bremen
Copy link
Member

From that post:

Library Authors: Don't target only .NET Standard if you work on Full Framework!

If you are a library author, multi-targeting in the newer .NET SDK Style project format is fairly easy to set up and assuming your library doesn't depend on some of the newest features that are in .NET Standard that didn't exist previously, there are usually no code changes required to compile both for .NET Standard or Full Framework.

For the time being I think any popular 3rd party library that is expected to work on full .NET Framework, should continue to ship a full framework target in addition to .NET Standard.

So I guess it would make sense to target ExCSS_Core to an additional .NET framework.

@allegion-ddreher
Copy link

At the moment SVG nuget package for 3.x version has a reference to Fizzler, so when you add SVG to your project, you automatically add Fizzler, too. 2.x versions don't have this dependency. SVG uses MSPL, but Fizzler uses LGPL. There a lot of reasons, why project cannot use LGPL libraries but can use MSPL libraries (you may ask lawyers, I am no lawyer...).
Currently I am enable to use SVG 2.x in my project, but not 3.x because of the Fizzler dependency. Even if I don't need features that use Fizzler's code. Conclusion is that I still can use 2.x, but not update to 3.x.
Are there any plans to provide a smaller package without the Fizzler stuff, so that I can be used without the restrictions of LGPL? Or is there any other solution for this without being locked-in to 2.x?

@mrbean-bremen
Copy link
Member

mrbean-bremen commented May 25, 2022

If you check out the discussion thread you will see that the Fizzler library was already used in 2.x, but it had been copied in without mentioning it or its license. The whole purpose of this issue was to remedy this situation by linking to the library (which is explicitely allowed by the LGPL) instead of just including its sources, which was a violation of the license. Also of course, this kind of usage is not nice to the creator/owner of the library.

I'm also not a lawyer, but I know that LGPL libraries are included in a lot of commercial software with no problem if properly attributed, e.g. by mentioning its usage and pointing to its source code somewhere, for example in an about box (I have been involved in license clearing for commercial applications myself). I understand that your legal department may have other opinions, but I don't see an easy way to avoid this at the moment without moving the whole parsing part out of the library and use it only optionally. I think that this would be possible in principle, but somebody has to find the free time to do it of course...

@mrbean-bremen
Copy link
Member

The ExCSS had been handled in #596, so this can be closed again.

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

Successfully merging a pull request may close this issue.

9 participants