Git Product home page Git Product logo

Comments (31)

evmar avatar evmar commented on May 20, 2024 15

LLVM is changing their license to a ""Apache 2.0 with LLVM Exception", where the exception is a block at the end of the license to work around issues like these.

http://llvm.org/foundation/relicensing/
http://llvm.org/foundation/relicensing/LICENSE.txt (scroll to the bottom to see the exception)

from tslib.

DanielRosenwasser avatar DanielRosenwasser commented on May 20, 2024 15

Hey all, after some internal discussion, we're leaning towards relicensing tslib under the Zero-Clause BSD license. 0BSD is derived from the ISC license, but specifically differs in that it does not place any requirement on the copyright notice appearing in copies of the licensed work.

- Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. 
+ Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.

 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 

In the near future, we'll be putting up a PR to replace the license. We'll give the PR about 10 business days, and if there are no strong objections, we'll pull the change in and publish a new version of tslib with the less-restrictive license.

from tslib.

DanielRosenwasser avatar DanielRosenwasser commented on May 20, 2024 11

tslib 1.11.2 should contain the relicense.

Thanks to everyone for helping out here and being patient! 🙂

from tslib.

DanielRosenwasser avatar DanielRosenwasser commented on May 20, 2024 10

Hey all, just wanted to thank everyone for your patience and to give an update here.

We've managed to get the conversation rolling further and I'm generally pretty happy with the direction we're moving towards. We're looking into adding a license exception, but the specifics are in the works. When we figure that out, we'll post it here to get a gauge on whether the language feels reasonable.

from tslib.

evmar avatar evmar commented on May 20, 2024 8

Another update on this: as best we can tell at this point, this is not going to be fixed by the TS team -- we've attempted to reach out many times across two years and through multiple channels and still don't have a response.

Our best idea at this point is to attempt a clean room reimplementation of tslib, though we haven't seriously investigated it at this point. If you were considering doing the same, please comment on this bug to share what you end up with.

from tslib.

snario avatar snario commented on May 20, 2024 4

+1

from tslib.

pkieltyka avatar pkieltyka commented on May 20, 2024 4

+1

from tslib.

evmar avatar evmar commented on May 20, 2024 3

Another ping -- @DanielRosenwasser's comment is exactly what we want, but we need it in some place that lawyers will believe, because I believe GitHub comments are non-binding. ;)

from tslib.

DanielRosenwasser avatar DanielRosenwasser commented on May 20, 2024 2

As an update, I've reached out to our appropriate legal reps. They're not in the office at the moment so we'll need to wait on that.

from tslib.

evmar avatar evmar commented on May 20, 2024 1

Sorry to re-ping, just wanted to make sure you didn't forget this.

from tslib.

mmotorny avatar mmotorny commented on May 20, 2024 1

Please do not use "public domain", it's not a license and it makes it impossible to use such code in corporate context. Essentially, only government or very long time makes code public domain.

from tslib.

evmar avatar evmar commented on May 20, 2024 1

The exceptions in C++ compilers (LLVM/gcc) are actually written about that case specifically, where the compiler emits some code into the resulting binary, like TS without importHelpers. Currently TS is silent about the legal status of the code in inserts inline, which is what the above LLVM exception is more concerned with.

The tslib issue makes this problem more apparent because it tslib does have an explicit license on it.

from tslib.

evmar avatar evmar commented on May 20, 2024 1

I spoke to @DanielRosenwasser in person about this at tsconf, and I now understand I had two separate issues confused.

  1. Code that TS inserts into the output bundle is of unclear copyright. This is the thing the LLVM exception is all about, but that is not what this particular issue is about.
  2. This library (tslib) that TS may add as dependency of output, and how that requires the resulting artifacts to carry the MS copyright. For this one, the best solution is to relicense this library as something that doesn't require the MS copyright on compilation output.

For #2, you can use a license like:
https://opensource.org/licenses/0BSD
For your lawyers, I know it's not the normal license you'd like to use, but this is all for a very special case and it's also not very much code.

from tslib.

DanielRosenwasser avatar DanielRosenwasser commented on May 20, 2024 1

@phinguyen202 as long as you specifically call out which parts are MIT vs. Apache 2.0 you should be fine, but I'd check with an attorney regarding what you're trying to achieve.

Keep in mind, if you're writing a library, you shouldn't need to bundle tslib - let your consumers do that.

from tslib.

DanielRosenwasser avatar DanielRosenwasser commented on May 20, 2024

Hmm, this definitely was not the intent; these helpers get auto-injected anyway. Babel has also done this with their helpers under an MIT license which has similar implications. Let me try to figure things out on our end.

from tslib.

evmar avatar evmar commented on May 20, 2024

Just wanted to ask if there was any progress on this.

from tslib.

evmar avatar evmar commented on May 20, 2024

Ping again!

from tslib.

ricmoo avatar ricmoo commented on May 20, 2024

Heya @DanielRosenwasser !

I would also like to include this in the dist builds of ethers, but the Apache license is incompatible.

Could we possibly get these licensed under multiple, permissive licenses (e.g. MIT, BSD, et cetera)?

Or better yet, just released into the public domain.

Or provide a way in TypeScript to override the library included with importHelpers, so we can override "tslib" with our own implementations.

Thanks! :)

from tslib.

DanielRosenwasser avatar DanielRosenwasser commented on May 20, 2024

@ricmoo if you're bundling, couldn't you use path aliasing? But I could see that.

Also, looping back with our legal team.

from tslib.

evmar avatar evmar commented on May 20, 2024

Maybe legal team is now back from vacation and ready to take a fresh look? (Sorry again for all the annoying comments!)

from tslib.

DanielRosenwasser avatar DanielRosenwasser commented on May 20, 2024

So here's what I can state given the conversations I've had thus far.

Occasionally, the TypeScript compiler injects JavaScript code that users don’t actually write. These are helper functions to make it easier for us to make JavaScript work equivalently with respect to the input TypeScript code. We do not expect users to provide any reference to the Apache 2.0 license governing the TypeScript compiler for the JavaScript code occasionally injected into the output of the compiler. Likewise, we have no expectation that the license text in tslib needs to be retained upon redistribution.

from tslib.

ricmoo avatar ricmoo commented on May 20, 2024

Can that “expectation” be put in writing? :)

Maybe a /*! Public domain: Microsoft 2018 */ injected into the code along side it?

from tslib.

avonwyss avatar avonwyss commented on May 20, 2024

@mmotorny There are "public-domain" licenses such as the CC0 or the Unlicense which should not be problematic in corporate environments (the problems are when there is no license, because this means that the author retains the copyrights). IMHO any of these should be a good fit for the TSLib code.

from tslib.

mmotorny avatar mmotorny commented on May 20, 2024

@avonwyss I'm aware of CC0 and Unlicense, but that's not what @ricmoo was suggesting.

from tslib.

ricmoo avatar ricmoo commented on May 20, 2024

Really all I was implying is that the license be inlined, and formalized. Not simply suggested in a GitHub issue that it "should be alright to include"...

from tslib.

grandin-j avatar grandin-j commented on May 20, 2024

Any movement here? It seems like everyone agrees on the solution. Any chance of making it happen?

from tslib.

SamB avatar SamB commented on May 20, 2024

We're looking into adding a license exception,

So, the kind that, like the LLVM exception mentioned above, gets listed at https://spdx.org/licenses/exceptions-index.html, or the kind where your legal people say "yeah, you can use a more liberal license for that part of the code"?

Also, the part about the non---importHelpers case not adding any Apache license headers got me thinking:

Why isn't tslib just getting the helper code from the compiler, perhaps using a special flag to ask tsc to just spit out all helpers (for a given target).

That might not really help with the legal situation, but wouldn't it simplify updates to tslib?

from tslib.

owen-m1 avatar owen-m1 commented on May 20, 2024

+1 - I cannot use Typescript in some open source until this is changed

from tslib.

phinguyen202 avatar phinguyen202 commented on May 20, 2024

Hi guys,
I know less about licences. I'm writing a react library using typescript and tslib. And yeah, I know I have include Ms copyright+license in the resulting product as evmar said. I'm planning to set it under MIT licence. Is that any illegal?

from tslib.

DanielRosenwasser avatar DanielRosenwasser commented on May 20, 2024

See #96 for the PR.

from tslib.

penx avatar penx commented on May 20, 2024

Despite the move to zero clause BSD, bundlers still retain the license because it starts with /*!

https://stackoverflow.com/questions/11248363/the-purpose-of-starting-an-initial-comment-with-in-javascript-and-css-files

This is for legal reasons. By default comments with @license, @preserve or starting with /*! are preserved

webpack/webpack#324 (comment)

I have opened #160 to remove the /*!.

from tslib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.