diff --git a/build.sbt b/build.sbt index a50be2fd26c0..0be71a204a71 100644 --- a/build.sbt +++ b/build.sbt @@ -2435,6 +2435,8 @@ lazy val `engine-runner` = project // "-g", // "-H:+SourceLevelDebug", // "-H:-DeleteLocalSymbols", + // you may need to set smallJdk := None to use following flags: + // "--trace-class-initialization=org.enso.syntax2.Parser", "-Dnic=nic" ), mainClass = Some("org.enso.runner.Main"), @@ -2442,7 +2444,6 @@ lazy val `engine-runner` = project "org.jline.nativ.JLineLibrary", "org.jline.terminal.impl.jna", "io.methvin.watchservice.jna.CarbonAPI", - "org.enso.syntax2.Parser", "zio.internal.ZScheduler$$anon$4", "org.enso.runner.Main$", "sun.awt", @@ -2476,6 +2477,7 @@ lazy val `engine-runner` = project .dependsOn(`library-manager`) .dependsOn(`language-server`) .dependsOn(`edition-updater`) + .dependsOn(`runtime-parser`) .dependsOn(`logging-service`) .dependsOn(`logging-service-logback` % Runtime) .dependsOn(`polyglot-api`) diff --git a/build/build/src/engine/context.rs b/build/build/src/engine/context.rs index 3a9f66523023..eaa17546d2df 100644 --- a/build/build/src/engine/context.rs +++ b/build/build/src/engine/context.rs @@ -649,5 +649,17 @@ pub async fn runner_sanity_test( output.contains(factorial_expected_output), "Native runner output does not contain expected result '{factorial_expected_output}'. Output:\n{output}", ); + if enso_java.is_none() { + let test_base = Command::new(&repo_root.runner) + .args(["--run", repo_root.test.join("Base_Tests").as_str(), "^Text"]) + .set_env_opt(ENSO_JAVA, enso_java)? + .set_env(ENSO_DATA_DIRECTORY, engine_package)? + .run_stdout() + .await?; + ensure!( + test_base.contains("0 tests failed."), + "All tests shall succeed. Output:\n{test_base}", + ); + } Ok(()) } diff --git a/distribution/engine/THIRD-PARTY/NOTICE b/distribution/engine/THIRD-PARTY/NOTICE index ec6045ddfe21..07e1563d71b0 100644 --- a/distribution/engine/THIRD-PARTY/NOTICE +++ b/distribution/engine/THIRD-PARTY/NOTICE @@ -46,31 +46,11 @@ The license information can be found along with the copyright notices. Copyright notices related to this dependency can be found in the directory `com.fasterxml.jackson.module.jackson-module-scala_2.13-2.15.2`. -'error_prone_annotations', licensed under the Apache 2.0, is distributed with the engine. -The license file can be found at `licenses/APACHE2.0`. -Copyright notices related to this dependency can be found in the directory `com.google.errorprone.error_prone_annotations-2.18.0`. - - 'flatbuffers-java', licensed under the Apache License V2.0, is distributed with the engine. The license file can be found at `licenses/APACHE2.0`. Copyright notices related to this dependency can be found in the directory `com.google.flatbuffers.flatbuffers-java-24.3.25`. -'failureaccess', licensed under the The Apache Software License, Version 2.0, is distributed with the engine. -The license file can be found at `licenses/APACHE2.0`. -Copyright notices related to this dependency can be found in the directory `com.google.guava.failureaccess-1.0.1`. - - -'guava', licensed under the Apache License, Version 2.0, is distributed with the engine. -The license file can be found at `licenses/APACHE2.0`. -Copyright notices related to this dependency can be found in the directory `com.google.guava.guava-32.0.0-jre`. - - -'j2objc-annotations', licensed under the Apache License, Version 2.0, is distributed with the engine. -The license file can be found at `licenses/APACHE2.0`. -Copyright notices related to this dependency can be found in the directory `com.google.j2objc.j2objc-annotations-2.8`. - - 'JavaEWAH', licensed under the Apache 2, is distributed with the engine. The license file can be found at `licenses/APACHE2.0`. Copyright notices related to this dependency can be found in the directory `com.googlecode.javaewah.JavaEWAH-1.2.3`. @@ -311,11 +291,6 @@ The license file can be found at `licenses/Bouncy_Castle_Licence.txt`. Copyright notices related to this dependency can be found in the directory `org.bouncycastle.bcutil-jdk18on-1.76`. -'checker-qual', licensed under the The MIT License, is distributed with the engine. -The license information can be found along with the copyright notices. -Copyright notices related to this dependency can be found in the directory `org.checkerframework.checker-qual-3.33.0`. - - 'org.eclipse.jgit', licensed under the Eclipse Distribution License (New BSD License), is distributed with the engine. The license file can be found at `licenses/Eclipse_Distribution_License_(New_BSD_License)`. Copyright notices related to this dependency can be found in the directory `org.eclipse.jgit.org.eclipse.jgit-6.7.0.202309050840-r`. diff --git a/distribution/engine/THIRD-PARTY/com.google.errorprone.error_prone_annotations-2.18.0/NOTICES b/distribution/engine/THIRD-PARTY/com.google.errorprone.error_prone_annotations-2.18.0/NOTICES deleted file mode 100644 index 61b725caf204..000000000000 --- a/distribution/engine/THIRD-PARTY/com.google.errorprone.error_prone_annotations-2.18.0/NOTICES +++ /dev/null @@ -1,9 +0,0 @@ -Copyright 2014 The Error Prone Authors. - -Copyright 2015 The Error Prone Authors. - -Copyright 2016 The Error Prone Authors. - -Copyright 2017 The Error Prone Authors. - -Copyright 2021 The Error Prone Authors. diff --git a/distribution/engine/THIRD-PARTY/com.google.guava.failureaccess-1.0.1/NOTICES b/distribution/engine/THIRD-PARTY/com.google.guava.failureaccess-1.0.1/NOTICES deleted file mode 100644 index 5c779f6eb124..000000000000 --- a/distribution/engine/THIRD-PARTY/com.google.guava.failureaccess-1.0.1/NOTICES +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright (C) 2018 The Guava Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ diff --git a/distribution/engine/THIRD-PARTY/com.google.guava.guava-32.0.0-jre/NOTICES b/distribution/engine/THIRD-PARTY/com.google.guava.guava-32.0.0-jre/NOTICES deleted file mode 100644 index 8095fdbd215a..000000000000 --- a/distribution/engine/THIRD-PARTY/com.google.guava.guava-32.0.0-jre/NOTICES +++ /dev/null @@ -1,5 +0,0 @@ -Copyright (C) 2021 The Guava Authors - -Copyright 2011 Google Inc. All Rights Reserved. - -domain. The author hereby disclaims copyright to this source code. diff --git a/distribution/engine/THIRD-PARTY/com.google.j2objc.j2objc-annotations-2.8/NOTICES b/distribution/engine/THIRD-PARTY/com.google.j2objc.j2objc-annotations-2.8/NOTICES deleted file mode 100644 index 0b517a543509..000000000000 --- a/distribution/engine/THIRD-PARTY/com.google.j2objc.j2objc-annotations-2.8/NOTICES +++ /dev/null @@ -1 +0,0 @@ -Copyright 2012 Google Inc. All Rights Reserved. diff --git a/distribution/engine/THIRD-PARTY/org.checkerframework.checker-qual-3.33.0/LICENSE.txt b/distribution/engine/THIRD-PARTY/org.checkerframework.checker-qual-3.33.0/LICENSE.txt deleted file mode 100644 index 9837c6b69fda..000000000000 --- a/distribution/engine/THIRD-PARTY/org.checkerframework.checker-qual-3.33.0/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Checker Framework qualifiers -Copyright 2004-present by the Checker Framework developers - -MIT License: - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/distribution/engine/THIRD-PARTY/org.checkerframework.checker-qual-3.33.0/LICENSE.txt.1 b/distribution/engine/THIRD-PARTY/org.checkerframework.checker-qual-3.33.0/LICENSE.txt.1 deleted file mode 100644 index 70d6a70fe2fb..000000000000 --- a/distribution/engine/THIRD-PARTY/org.checkerframework.checker-qual-3.33.0/LICENSE.txt.1 +++ /dev/null @@ -1,414 +0,0 @@ -The Checker Framework -Copyright 2004-present by the Checker Framework developers - - -Most of the Checker Framework is licensed under the GNU General Public -License, version 2 (GPL2), with the classpath exception. The text of this -license appears below. This is the same license used for OpenJDK. - -A few parts of the Checker Framework have more permissive licenses, notably -the parts that you might want to include with your own program. - - * The annotations and utility files are licensed under the MIT License. - (The text of this license also appears below.) This applies to the - checker-qual*.jar and all the files that appear in it: every file in a - qual/ directory, plus utility files FormatUtil.java, - I18nFormatUtil.java, NullnessUtil.java, Opt.java, PurityUnqualified.java, - RegexUtil.java, SignednessUtil.java, SignednessUtilExtra.java, and - UnitsTools.java. It also applies to the cleanroom implementations of - third-party annotations (in checker/src/testannotations/ and in - framework/src/main/java/org/jmlspecs/). - -The Checker Framework includes annotations for some libraries. Those in -.astub files use the MIT License. Those in https://github.com/typetools/jdk -(which appears in the annotated-jdk directory of file checker.jar) use the -GPL2 license. - -Some external libraries that are included with the Checker Framework -distribution have different licenses. Here are some examples. - - * javaparser is dual licensed under the LGPL or the Apache license -- you - may use it under whichever one you want. (The javaparser source code - contains a file with the text of the GPL, but it is not clear why, since - javaparser does not use the GPL.) See - https://github.com/typetools/stubparser . - - * Annotation Tools (https://github.com/typetools/annotation-tools) uses - the MIT license. - - * Libraries in plume-lib (https://github.com/plume-lib/) are licensed - under the MIT License. - -=========================================================================== - -The GNU General Public License (GPL) - -Version 2, June 1991 - -Copyright (C) 1989, 1991 Free Software Foundation, Inc. -59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Everyone is permitted to copy and distribute verbatim copies of this license -document, but changing it is not allowed. - -Preamble - -The licenses for most software are designed to take away your freedom to share -and change it. By contrast, the GNU General Public License is intended to -guarantee your freedom to share and change free software--to make sure the -software is free for all its users. This General Public License applies to -most of the Free Software Foundation's software and to any other program whose -authors commit to using it. (Some other Free Software Foundation software is -covered by the GNU Library General Public License instead.) You can apply it to -your programs, too. - -When we speak of free software, we are referring to freedom, not price. Our -General Public Licenses are designed to make sure that you have the freedom to -distribute copies of free software (and charge for this service if you wish), -that you receive source code or can get it if you want it, that you can change -the software or use pieces of it in new free programs; and that you know you -can do these things. - -To protect your rights, we need to make restrictions that forbid anyone to deny -you these rights or to ask you to surrender the rights. These restrictions -translate to certain responsibilities for you if you distribute copies of the -software, or if you modify it. - -For example, if you distribute copies of such a program, whether gratis or for -a fee, you must give the recipients all the rights that you have. You must -make sure that they, too, receive or can get the source code. And you must -show them these terms so they know their rights. - -We protect your rights with two steps: (1) copyright the software, and (2) -offer you this license which gives you legal permission to copy, distribute -and/or modify the software. - -Also, for each author's protection and ours, we want to make certain that -everyone understands that there is no warranty for this free software. If the -software is modified by someone else and passed on, we want its recipients to -know that what they have is not the original, so that any problems introduced -by others will not reflect on the original authors' reputations. - -Finally, any free program is threatened constantly by software patents. We -wish to avoid the danger that redistributors of a free program will -individually obtain patent licenses, in effect making the program proprietary. -To prevent this, we have made it clear that any patent must be licensed for -everyone's free use or not licensed at all. - -The precise terms and conditions for copying, distribution and modification -follow. - -TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - -0. This License applies to any program or other work which contains a notice -placed by the copyright holder saying it may be distributed under the terms of -this General Public License. The "Program", below, refers to any such program -or work, and a "work based on the Program" means either the Program or any -derivative work under copyright law: that is to say, a work containing the -Program or a portion of it, either verbatim or with modifications and/or -translated into another language. (Hereinafter, translation is included -without limitation in the term "modification".) Each licensee is addressed as -"you". - -Activities other than copying, distribution and modification are not covered by -this License; they are outside its scope. The act of running the Program is -not restricted, and the output from the Program is covered only if its contents -constitute a work based on the Program (independent of having been made by -running the Program). Whether that is true depends on what the Program does. - -1. You may copy and distribute verbatim copies of the Program's source code as -you receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice and -disclaimer of warranty; keep intact all the notices that refer to this License -and to the absence of any warranty; and give any other recipients of the -Program a copy of this License along with the Program. - -You may charge a fee for the physical act of transferring a copy, and you may -at your option offer warranty protection in exchange for a fee. - -2. You may modify your copy or copies of the Program or any portion of it, thus -forming a work based on the Program, and copy and distribute such modifications -or work under the terms of Section 1 above, provided that you also meet all of -these conditions: - - a) You must cause the modified files to carry prominent notices stating - that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in whole or - in part contains or is derived from the Program or any part thereof, to be - licensed as a whole at no charge to all third parties under the terms of - this License. - - c) If the modified program normally reads commands interactively when run, - you must cause it, when started running for such interactive use in the - most ordinary way, to print or display an announcement including an - appropriate copyright notice and a notice that there is no warranty (or - else, saying that you provide a warranty) and that users may redistribute - the program under these conditions, and telling the user how to view a copy - of this License. (Exception: if the Program itself is interactive but does - not normally print such an announcement, your work based on the Program is - not required to print an announcement.) - -These requirements apply to the modified work as a whole. If identifiable -sections of that work are not derived from the Program, and can be reasonably -considered independent and separate works in themselves, then this License, and -its terms, do not apply to those sections when you distribute them as separate -works. But when you distribute the same sections as part of a whole which is a -work based on the Program, the distribution of the whole must be on the terms -of this License, whose permissions for other licensees extend to the entire -whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest your -rights to work written entirely by you; rather, the intent is to exercise the -right to control the distribution of derivative or collective works based on -the Program. - -In addition, mere aggregation of another work not based on the Program with the -Program (or with a work based on the Program) on a volume of a storage or -distribution medium does not bring the other work under the scope of this -License. - -3. You may copy and distribute the Program (or a work based on it, under -Section 2) in object code or executable form under the terms of Sections 1 and -2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable source - code, which must be distributed under the terms of Sections 1 and 2 above - on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three years, to - give any third party, for a charge no more than your cost of physically - performing source distribution, a complete machine-readable copy of the - corresponding source code, to be distributed under the terms of Sections 1 - and 2 above on a medium customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer to - distribute corresponding source code. (This alternative is allowed only - for noncommercial distribution and only if you received the program in - object code or executable form with such an offer, in accord with - Subsection b above.) - -The source code for a work means the preferred form of the work for making -modifications to it. For an executable work, complete source code means all -the source code for all modules it contains, plus any associated interface -definition files, plus the scripts used to control compilation and installation -of the executable. However, as a special exception, the source code -distributed need not include anything that is normally distributed (in either -source or binary form) with the major components (compiler, kernel, and so on) -of the operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the source -code from the same place counts as distribution of the source code, even though -third parties are not compelled to copy the source along with the object code. - -4. You may not copy, modify, sublicense, or distribute the Program except as -expressly provided under this License. Any attempt otherwise to copy, modify, -sublicense or distribute the Program is void, and will automatically terminate -your rights under this License. However, parties who have received copies, or -rights, from you under this License will not have their licenses terminated so -long as such parties remain in full compliance. - -5. You are not required to accept this License, since you have not signed it. -However, nothing else grants you permission to modify or distribute the Program -or its derivative works. These actions are prohibited by law if you do not -accept this License. Therefore, by modifying or distributing the Program (or -any work based on the Program), you indicate your acceptance of this License to -do so, and all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - -6. Each time you redistribute the Program (or any work based on the Program), -the recipient automatically receives a license from the original licensor to -copy, distribute or modify the Program subject to these terms and conditions. -You may not impose any further restrictions on the recipients' exercise of the -rights granted herein. You are not responsible for enforcing compliance by -third parties to this License. - -7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), conditions -are imposed on you (whether by court order, agreement or otherwise) that -contradict the conditions of this License, they do not excuse you from the -conditions of this License. If you cannot distribute so as to satisfy -simultaneously your obligations under this License and any other pertinent -obligations, then as a consequence you may not distribute the Program at all. -For example, if a patent license would not permit royalty-free redistribution -of the Program by all those who receive copies directly or indirectly through -you, then the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply and -the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any patents or -other property right claims or to contest validity of any such claims; this -section has the sole purpose of protecting the integrity of the free software -distribution system, which is implemented by public license practices. Many -people have made generous contributions to the wide range of software -distributed through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing to -distribute software through any other system and a licensee cannot impose that -choice. - -This section is intended to make thoroughly clear what is believed to be a -consequence of the rest of this License. - -8. If the distribution and/or use of the Program is restricted in certain -countries either by patents or by copyrighted interfaces, the original -copyright holder who places the Program under this License may add an explicit -geographical distribution limitation excluding those countries, so that -distribution is permitted only in or among countries not thus excluded. In -such case, this License incorporates the limitation as if written in the body -of this License. - -9. The Free Software Foundation may publish revised and/or new versions of the -General Public License from time to time. Such new versions will be similar in -spirit to the present version, but may differ in detail to address new problems -or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any later -version", you have the option of following the terms and conditions either of -that version or of any later version published by the Free Software Foundation. -If the Program does not specify a version number of this License, you may -choose any version ever published by the Free Software Foundation. - -10. If you wish to incorporate parts of the Program into other free programs -whose distribution conditions are different, write to the author to ask for -permission. For software which is copyrighted by the Free Software Foundation, -write to the Free Software Foundation; we sometimes make exceptions for this. -Our decision will be guided by the two goals of preserving the free status of -all derivatives of our free software and of promoting the sharing and reuse of -software generally. - -NO WARRANTY - -11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR -THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE -STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE -PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, -INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND -PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, -YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - -12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL -ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE -PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR -INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA -BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER -OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -END OF TERMS AND CONDITIONS - -How to Apply These Terms to Your New Programs - -If you develop a new program, and you want it to be of the greatest possible -use to the public, the best way to achieve this is to make it free software -which everyone can redistribute and change under these terms. - -To do so, attach the following notices to the program. It is safest to attach -them to the start of each source file to most effectively convey the exclusion -of warranty; and each file should have at least the "copyright" line and a -pointer to where the full notice is found. - - One line to give the program's name and a brief idea of what it does. - - Copyright (C) - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the Free - Software Foundation; either version 2 of the License, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., 59 - Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this when it -starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author Gnomovision comes - with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free - software, and you are welcome to redistribute it under certain conditions; - type 'show c' for details. - -The hypothetical commands 'show w' and 'show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may be -called something other than 'show w' and 'show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your school, -if any, to sign a "copyright disclaimer" for the program, if necessary. Here -is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - 'Gnomovision' (which makes passes at compilers) written by James Hacker. - - signature of Ty Coon, 1 April 1989 - - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General Public -License instead of this License. - - -"CLASSPATH" EXCEPTION TO THE GPL - -Certain source files distributed by Oracle America and/or its affiliates are -subject to the following clarification and special exception to the GPL, but -only where Oracle has expressly included in the particular source file's header -the words "Oracle designates this particular file as subject to the "Classpath" -exception as provided by Oracle in the LICENSE file that accompanied this code." - - Linking this library statically or dynamically with other modules is making - a combined work based on this library. Thus, the terms and conditions of - the GNU General Public License cover the whole combination. - - As a special exception, the copyright holders of this library give you - permission to link this library with independent modules to produce an - executable, regardless of the license terms of these independent modules, - and to copy and distribute the resulting executable under terms of your - choice, provided that you also meet, for each linked independent module, - the terms and conditions of the license of that module. An independent - module is a module which is not derived from or based on this library. If - you modify this library, you may extend this exception to your version of - the library, but you are not obligated to do so. If you do not wish to do - so, delete this exception statement from your version. - -=========================================================================== - -MIT License: - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -=========================================================================== diff --git a/distribution/engine/THIRD-PARTY/org.checkerframework.checker-qual-3.33.0/NOTICES b/distribution/engine/THIRD-PARTY/org.checkerframework.checker-qual-3.33.0/NOTICES deleted file mode 100644 index 2f40bf232f12..000000000000 --- a/distribution/engine/THIRD-PARTY/org.checkerframework.checker-qual-3.33.0/NOTICES +++ /dev/null @@ -1,5 +0,0 @@ -This program only distributes portions of the module contained in one of the checker-qual*.jar files, -so as described in the attached LICENSE.txt, only the MIT license applies. -The LGPL license is included for completeness, but it does not apply in our usecase, -as we only distribute the MIT-licensed components. - diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Json.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Json.enso index f384a3a1e723..4180b173102e 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Json.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Json.enso @@ -42,6 +42,7 @@ polyglot java import com.fasterxml.jackson.databind.node.NullNode polyglot java import com.fasterxml.jackson.databind.node.ObjectNode polyglot java import com.fasterxml.jackson.databind.node.TextNode polyglot java import com.fasterxml.jackson.databind.ObjectMapper +polyglot java import java.util.Iterator ## Methods for serializing from and to JSON. type Json @@ -151,7 +152,7 @@ type JS_Object Vector.build initial_capacity=object.size builder-> loop iterator builder = if iterator.hasNext then - builder.append iterator.next + builder.append (iterator:Iterator).next @Tail_Call loop iterator builder loop name_iterator builder JS_Object.Value object_node (make_field_names object_node) diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Statistics.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Statistics.enso index 5806b4568606..4d021375942c 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Statistics.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Statistics.enso @@ -23,6 +23,7 @@ polyglot java import java.lang.NullPointerException polyglot java import org.enso.base.CompareException polyglot java import org.enso.base.statistics.CorrelationStatistics polyglot java import org.enso.base.statistics.Rank +polyglot java import org.enso.base.statistics.Rank.Method polyglot java import org.enso.base.statistics.Statistic as Java_Statistic ## Specifies how to handle ranking of equal values. @@ -52,11 +53,11 @@ type Rank_Method compute : Vector -> Vector compute self input = java_method = case self of - Rank_Method.Minimum -> Rank.Method.MINIMUM - Rank_Method.Maximum -> Rank.Method.MAXIMUM - Rank_Method.Average -> Rank.Method.AVERAGE - Rank_Method.Ordinal -> Rank.Method.ORDINAL - Rank_Method.Dense -> Rank.Method.DENSE + Rank_Method.Minimum -> Method.MINIMUM + Rank_Method.Maximum -> Method.MAXIMUM + Rank_Method.Average -> Method.AVERAGE + Rank_Method.Ordinal -> Method.ORDINAL + Rank_Method.Dense -> Method.DENSE report_nullpointer caught_panic = Error.throw (Illegal_Argument.Error caught_panic.payload.getMessage) handle_nullpointer = Panic.catch NullPointerException handler=report_nullpointer diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Text/Extensions.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Text/Extensions.enso index 58f00cd85591..81a8ce41ef81 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Text/Extensions.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Data/Text/Extensions.enso @@ -46,6 +46,9 @@ polyglot java import java.lang.StringBuilder polyglot java import org.enso.base.Encoding_Utils polyglot java import org.enso.base.Regex_Utils polyglot java import org.enso.base.Text_Utils +polyglot java import org.enso.base.text.Utf16Span +polyglot java import org.enso.base.text.GraphemeSpan +polyglot java import org.enso.base.text.ResultWithWarnings ## GROUP Text ICON text @@ -393,7 +396,8 @@ Text.split self delimiter="," case_sensitivity=Case_Sensitivity.Sensitive use_re start = if i == 0 then 0 else delimiters.at i-1 . codeunit_end end = if i == delimiters.length then (Text_Utils.char_length self) else - delimiters.at i . codeunit_start + span = delimiters.at i + (span : Utf16Span) . codeunit_start Text_Utils.substring self start end True -> case delimiter of _ : Text -> @@ -537,7 +541,7 @@ Text.replace self term:(Text | Regex) replacement:Text (case_sensitivity:Case_Se Applies the specified cleansings to the text. Arguments: - - remove: A vector of the text cleanings to remove from the text. The text cleansings are + - remove: A vector of the text cleanings to remove from the text. The text cleansings are applied in the order they are provided. The same text cleansing can be used multiple times. The text cleansings are: - ..Leading_Whitespace: Removes all whitspace from the start of the string. @@ -757,7 +761,7 @@ Text.bytes self encoding on_problems=Problem_Behavior.Report_Warning = @encoding Encoding.default_widget Text.from_bytes : Vector Integer -> Encoding -> Problem_Behavior -> Text Text.from_bytes bytes encoding on_problems=Problem_Behavior.Report_Error = - result = Encoding_Utils.from_bytes bytes (encoding . to_java_charset) + result = Encoding_Utils.from_bytes bytes (encoding . to_java_charset) : ResultWithWarnings if result.warnings.is_nothing then result.result else on_problems.attach_problems_after result.result [Encoding_Error.Error result.warnings] @@ -1346,7 +1350,7 @@ Text.locate self term="" mode=Matching_Mode.First case_sensitivity=Case_Sensitiv case Text_Utils.span_of_case_insensitive self term locale.java_locale search_for_last of Nothing -> Nothing grapheme_span -> - Span.Value (grapheme_span.grapheme_start.up_to grapheme_span.grapheme_end) self + Span.Value ((grapheme_span:GraphemeSpan).grapheme_start.up_to grapheme_span.grapheme_end) self ## ALIAS index_of_all, position_of_all, span_of_all GROUP Text diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Internal/Extra_Imports.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Internal/Extra_Imports.enso new file mode 100644 index 000000000000..4981b39243ae --- /dev/null +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Internal/Extra_Imports.enso @@ -0,0 +1,16 @@ +private + +# this file contains additional imports necessary for +# building native image version of Enso with Standard +# libraries included in + +# needed for Standard.Test.Test_Reporter +# tracked as https://github.com/enso-org/enso/issues/10028 +polyglot java import java.io.PrintStream + +# needed by Util_Spec +polyglot java import org.enso.base.text.CaseFoldedString +polyglot java import org.enso.base.text.CaseFoldedString.Grapheme + +# needed by Comparator_Spec: +polyglot java import org.enso.base.ObjectComparator diff --git a/engine/runner/src/main/java/org/enso/runner/EnsoLibraryFeature.java b/engine/runner/src/main/java/org/enso/runner/EnsoLibraryFeature.java new file mode 100644 index 000000000000..86a7cddadbb1 --- /dev/null +++ b/engine/runner/src/main/java/org/enso/runner/EnsoLibraryFeature.java @@ -0,0 +1,93 @@ +package org.enso.runner; + +import static scala.jdk.javaapi.CollectionConverters.asJava; + +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.LinkedHashSet; +import java.util.TreeSet; +import org.enso.compiler.core.ir.module.scope.imports.Polyglot; +import org.enso.pkg.PackageManager$; +import org.graalvm.nativeimage.hosted.Feature; +import org.graalvm.nativeimage.hosted.RuntimeReflection; + +public final class EnsoLibraryFeature implements Feature { + @Override + public void beforeAnalysis(BeforeAnalysisAccess access) { + var libs = new LinkedHashSet(); + for (var p : access.getApplicationClassPath()) { + var p1 = p.getParent(); + if (p1 != null && p1.getFileName().toString().equals("java")) { + var p2 = p1.getParent(); + if (p2 != null + && p2.getFileName().toString().equals("polyglot") + && p2.getParent() != null) { + libs.add(p2.getParent()); + } + } + } + + /* + To run Standard.Test one shall analyze its polyglot/java files. But there are none + to include on classpath as necessary test classes are included in Standard.Base! + We can locate the Test library by following code or we can make sure all necessary + imports are already mentioned in Standard.Base itself. + + if (!libs.isEmpty()) { + var f = libs.iterator().next(); + var stdTest = f.getParent().getParent().resolve("Test").resolve(f.getFileName()); + if (stdTest.toFile().exists()) { + libs.add(stdTest); + } + System.err.println("Testing library: " + stdTest); + } + */ + + var classes = new TreeSet(); + try (var parser = new org.enso.compiler.core.EnsoParser()) { + for (var p : libs) { + var result = PackageManager$.MODULE$.Default().loadPackage(p.toFile()); + if (result.isSuccess()) { + var pkg = result.get(); + for (var src : pkg.listSourcesJava()) { + var code = Files.readString(src.file().toPath()); + var ir = parser.compile(code); + for (var imp : asJava(ir.imports())) { + if (imp instanceof Polyglot poly && poly.entity() instanceof Polyglot.Java entity) { + var name = new StringBuilder(entity.getJavaName()); + Class clazz; + for (; ; ) { + clazz = access.findClassByName(name.toString()); + if (clazz != null) { + break; + } + int at = name.toString().lastIndexOf('.'); + if (at < 0) { + throw new IllegalStateException("Cannot load " + entity.getJavaName()); + } + name.setCharAt(at, '$'); + } + classes.add(clazz.getName()); + RuntimeReflection.register(clazz); + RuntimeReflection.register(clazz.getConstructors()); + RuntimeReflection.register(clazz.getMethods()); + RuntimeReflection.register(clazz.getFields()); + RuntimeReflection.registerAllConstructors(clazz); + RuntimeReflection.registerAllFields(clazz); + RuntimeReflection.registerAllMethods(clazz); + } + } + } + } + } + } catch (Exception ex) { + ex.printStackTrace(); + throw new IllegalStateException(ex); + } + System.err.println("Summary for polyglot import java:"); + for (var className : classes) { + System.err.println(" " + className); + } + System.err.println("Registered " + classes.size() + " classes for reflection"); + } +} diff --git a/engine/runner/src/main/resources/META-INF/native-image/org/enso/runner/native-image.properties b/engine/runner/src/main/resources/META-INF/native-image/org/enso/runner/native-image.properties new file mode 100644 index 000000000000..9e58138f6461 --- /dev/null +++ b/engine/runner/src/main/resources/META-INF/native-image/org/enso/runner/native-image.properties @@ -0,0 +1 @@ +Args=--features=org.enso.runner.EnsoLibraryFeature diff --git a/engine/runtime/src/main/java/org/enso/interpreter/node/expression/builtin/interop/generic/GetSourceLocationNode.java b/engine/runtime/src/main/java/org/enso/interpreter/node/expression/builtin/interop/generic/GetSourceLocationNode.java index 88a43b238501..cb96b6ee92d2 100644 --- a/engine/runtime/src/main/java/org/enso/interpreter/node/expression/builtin/interop/generic/GetSourceLocationNode.java +++ b/engine/runtime/src/main/java/org/enso/interpreter/node/expression/builtin/interop/generic/GetSourceLocationNode.java @@ -23,8 +23,7 @@ public class GetSourceLocationNode extends Node { Object execute(Object value) { try { - return EnsoContext.get(this) - .asGuestValue(new EnsoSourceSection(library.getSourceLocation(value))); + return new EnsoSourceSection(library.getSourceLocation(value)); } catch (UnsupportedMessageException e) { err.enter(); Builtins builtins = EnsoContext.get(this).getBuiltins(); diff --git a/engine/runtime/src/main/java/org/enso/interpreter/runtime/EnsoContext.java b/engine/runtime/src/main/java/org/enso/interpreter/runtime/EnsoContext.java index e664ff8ba34d..aa3f468d2b3c 100644 --- a/engine/runtime/src/main/java/org/enso/interpreter/runtime/EnsoContext.java +++ b/engine/runtime/src/main/java/org/enso/interpreter/runtime/EnsoContext.java @@ -28,7 +28,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; -import java.util.List; import java.util.Optional; import java.util.Set; import java.util.UUID; @@ -522,34 +521,35 @@ public boolean isColorTerminalOutput() { */ @TruffleBoundary public Object lookupJavaClass(String className) { - var items = Arrays.asList(className.split("\\.")); + var binaryName = new StringBuilder(className); var collectedExceptions = new ArrayList(); - for (int i = items.size() - 1; i >= 0; i--) { - String pkgName = String.join(".", items.subList(0, i)); - String curClassName = items.get(i); - List nestedClassPart = - i < items.size() - 1 ? items.subList(i + 1, items.size()) : List.of(); + for (; ; ) { + var fqn = binaryName.toString(); try { - var hostSymbol = lookupHostSymbol(pkgName, curClassName); - if (nestedClassPart.isEmpty()) { + var hostSymbol = lookupHostSymbol(fqn); + if (hostSymbol != null) { return hostSymbol; - } else { - var fullInnerClassName = curClassName + "$" + String.join("$", nestedClassPart); - return lookupHostSymbol(pkgName, fullInnerClassName); } } catch (ClassNotFoundException | RuntimeException | InteropException ex) { collectedExceptions.add(ex); } + var at = fqn.lastIndexOf('.'); + if (at < 0) { + break; + } + binaryName.setCharAt(at, '$'); } + var level = Level.WARNING; for (var ex : collectedExceptions) { - logger.log(Level.WARNING, null, ex); + logger.log(level, ex.getMessage()); + level = Level.FINE; + logger.log(Level.FINE, null, ex); } return null; } - private Object lookupHostSymbol(String pkgName, String curClassName) + private Object lookupHostSymbol(String fqn) throws ClassNotFoundException, UnknownIdentifierException, UnsupportedMessageException { - var fqn = pkgName + "." + curClassName; try { if (findGuestJava() == null) { return environment.asHostSymbol(hostClassLoader.loadClass(fqn)); diff --git a/engine/runtime/src/main/java/org/enso/interpreter/runtime/data/EnsoSource.java b/engine/runtime/src/main/java/org/enso/interpreter/runtime/data/EnsoSource.java index 9dba83b3d8ee..fae77b1e7697 100644 --- a/engine/runtime/src/main/java/org/enso/interpreter/runtime/data/EnsoSource.java +++ b/engine/runtime/src/main/java/org/enso/interpreter/runtime/data/EnsoSource.java @@ -1,44 +1,72 @@ package org.enso.interpreter.runtime.data; +import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary; +import com.oracle.truffle.api.interop.InteropLibrary; +import com.oracle.truffle.api.library.CachedLibrary; +import com.oracle.truffle.api.library.ExportLibrary; +import com.oracle.truffle.api.library.ExportMessage; import com.oracle.truffle.api.source.Source; +import org.enso.interpreter.runtime.EnsoContext; +import org.enso.interpreter.runtime.data.text.Text; +import org.enso.interpreter.runtime.data.vector.ArrayLikeHelpers; /** Wrapper for exposing sources to Enso. Delegates to original methods with no behavior changes. */ -public class EnsoSource { +@ExportLibrary(InteropLibrary.class) +public final class EnsoSource implements EnsoObject { + private static final String[] MEMBERS = { + "getLanguage", // + "getName", // + "getPath", // + "isInternal", // + "getCharacters", // + "getLength", // + "getLineCount", // + }; private final Source source; public EnsoSource(Source source) { this.source = source; } - public String getLanguage() { - return source.getLanguage(); - } - - public String getName() { - return source.getName(); - } - - public String getPath() { - return source.getPath(); - } - - public boolean isInternal() { - return source.isInternal(); + /* + public CharSequence getCharacters(int lineNumber) { + return source.getCharacters(lineNumber); } + */ - public CharSequence getCharacters() { - return source.getCharacters(); + @ExportMessage + boolean hasMembers() { + return true; } - public int getLength() { - return source.getLength(); + @TruffleBoundary + @ExportMessage + Object readMember(String name, @CachedLibrary("this") InteropLibrary node) { + return switch (name) { + case "getLanguage" -> Text.create(source.getLanguage()); + case "getName" -> Text.create(source.getName()); + case "getPath" -> Text.create(source.getPath()); + case "isInternal" -> source.isInternal(); + case "getCharacters" -> Text.create(source.getCharacters().toString()); + case "getLength" -> source.getLength(); + case "getLineCount" -> source.getLineCount(); + default -> throw EnsoContext.get(node).raiseAssertionPanic(node, name, null); + }; } - public CharSequence getCharacters(int lineNumber) { - return source.getCharacters(lineNumber); + @ExportMessage + @TruffleBoundary + boolean isMemberReadable(String name) { + for (var n : MEMBERS) { + if (name.equals(n)) { + return true; + } + } + return false; } - public int getLineCount() { - return source.getLineCount(); + @ExportMessage + Object getMembers(boolean includeInternal) { + return ArrayLikeHelpers.wrapStrings(MEMBERS); } } diff --git a/engine/runtime/src/main/java/org/enso/interpreter/runtime/data/EnsoSourceSection.java b/engine/runtime/src/main/java/org/enso/interpreter/runtime/data/EnsoSourceSection.java index f35bc2a081dc..a15ab53416a7 100644 --- a/engine/runtime/src/main/java/org/enso/interpreter/runtime/data/EnsoSourceSection.java +++ b/engine/runtime/src/main/java/org/enso/interpreter/runtime/data/EnsoSourceSection.java @@ -1,67 +1,81 @@ package org.enso.interpreter.runtime.data; +import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary; +import com.oracle.truffle.api.interop.InteropLibrary; +import com.oracle.truffle.api.library.CachedLibrary; +import com.oracle.truffle.api.library.ExportLibrary; +import com.oracle.truffle.api.library.ExportMessage; import com.oracle.truffle.api.source.SourceSection; +import org.enso.interpreter.runtime.EnsoContext; +import org.enso.interpreter.runtime.data.text.Text; +import org.enso.interpreter.runtime.data.vector.ArrayLikeHelpers; /** * Wrapper for exposing source sections in Enso. Delegates to the original methods with no behaviour * changes. */ -public class EnsoSourceSection { +@ExportLibrary(InteropLibrary.class) +public final class EnsoSourceSection implements EnsoObject { + private static final String[] MEMBERS = { + "getStartLine", // + "getEndLine", // + "getEndColumn", // + "getCharIndex", // + "getCharLength", // + "getCharEndIndex", // + "getCharacters", // + "getStartColumn", // + "isAvailable", // + "hasLines", // + "hasColumns", // + "hasCharIndex", // + "getSource", // + }; private final SourceSection sourceSection; public EnsoSourceSection(SourceSection sourceSection) { this.sourceSection = sourceSection; } - public int getStartLine() { - return sourceSection.getStartLine(); + @ExportMessage + boolean hasMembers() { + return true; } - public int getEndLine() { - return sourceSection.getEndLine(); + @TruffleBoundary + @ExportMessage + Object readMember(String name, @CachedLibrary("this") InteropLibrary node) { + return switch (name) { + case "getStartLine" -> sourceSection.getStartLine(); + case "getEndLine" -> sourceSection.getEndLine(); + case "getEndColumn" -> sourceSection.getEndColumn(); + case "getCharIndex" -> sourceSection.getCharIndex(); + case "getCharLength" -> sourceSection.getCharLength(); + case "getCharEndIndex" -> sourceSection.getCharEndIndex(); + case "getCharacters" -> Text.create(sourceSection.getCharacters().toString()); + case "getStartColumn" -> sourceSection.getStartColumn(); + case "isAvailable" -> sourceSection.isAvailable(); + case "hasLines" -> sourceSection.hasLines(); + case "hasColumns" -> sourceSection.hasColumns(); + case "hasCharIndex" -> sourceSection.hasCharIndex(); + case "getSource" -> new EnsoSource(sourceSection.getSource()); + default -> throw EnsoContext.get(node).raiseAssertionPanic(node, name, null); + }; } - public int getEndColumn() { - return sourceSection.getEndColumn(); + @ExportMessage + @TruffleBoundary + boolean isMemberReadable(String name) { + for (var n : MEMBERS) { + if (name.equals(n)) { + return true; + } + } + return false; } - public int getCharIndex() { - return sourceSection.getCharIndex(); - } - - public int getCharLength() { - return sourceSection.getCharLength(); - } - - public int getCharEndIndex() { - return sourceSection.getCharEndIndex(); - } - - public CharSequence getCharacters() { - return sourceSection.getCharacters(); - } - - public int getStartColumn() { - return sourceSection.getStartColumn(); - } - - public boolean isAvailable() { - return sourceSection.isAvailable(); - } - - public boolean hasLines() { - return sourceSection.hasLines(); - } - - public boolean hasColumns() { - return sourceSection.hasColumns(); - } - - public boolean hasCharIndex() { - return sourceSection.hasCharIndex(); - } - - public EnsoSource getSource() { - return new EnsoSource(sourceSection.getSource()); + @ExportMessage + Object getMembers(boolean includeInternal) { + return ArrayLikeHelpers.wrapStrings(MEMBERS); } } diff --git a/engine/runtime/src/main/scala/org/enso/interpreter/runtime/IrToTruffle.scala b/engine/runtime/src/main/scala/org/enso/interpreter/runtime/IrToTruffle.scala index abdb0aef1991..6870809e2b7d 100644 --- a/engine/runtime/src/main/scala/org/enso/interpreter/runtime/IrToTruffle.scala +++ b/engine/runtime/src/main/scala/org/enso/interpreter/runtime/IrToTruffle.scala @@ -115,6 +115,7 @@ import scala.collection.mutable import scala.collection.mutable.ArrayBuffer import scala.jdk.CollectionConverters._ import scala.jdk.OptionConverters._ +import org.enso.interpreter.runtime.error.DataflowError /** This is an implementation of a codegeneration pass that lowers the Enso * [[IR]] into the truffle structures that are actually executed. @@ -231,17 +232,17 @@ class IrToTruffle( // Register the imports in scope importDefs.foreach { case poly @ imports.Polyglot(i: imports.Polyglot.Java, _, _, _, _) => - val hostSymbol = context.lookupJavaClass(i.getJavaName) - if (hostSymbol != null) { - this.moduleScope.registerPolyglotSymbol( - poly.getVisibleName, - hostSymbol - ) - } else { - throw new CompilerError( - s"Incorrect polyglot import: Cannot find host symbol (Java class) '${i.getJavaName}'" + var hostSymbol = context.lookupJavaClass(i.getJavaName) + if (hostSymbol == null) { + val err = Text.create( + s"Incorrect polyglot java import: ${i.getJavaName}" ) + hostSymbol = DataflowError.withoutTrace(err, null) } + this.moduleScope.registerPolyglotSymbol( + poly.getVisibleName, + hostSymbol + ) case _: Import.Module => case _: Error => } diff --git a/lib/rust/parser/generate-java/java/org/enso/syntax2/Parser.java b/lib/rust/parser/generate-java/java/org/enso/syntax2/Parser.java index 818a45d36f76..26fde4cc6b80 100644 --- a/lib/rust/parser/generate-java/java/org/enso/syntax2/Parser.java +++ b/lib/rust/parser/generate-java/java/org/enso/syntax2/Parser.java @@ -7,7 +7,7 @@ import java.nio.charset.StandardCharsets; public final class Parser implements AutoCloseable { - static { + private static void initializeLibraries() { String os = System.getProperty("os.name"); String name; if (os.startsWith("Mac")) { @@ -77,6 +77,7 @@ private Parser(long stateIn) { static native long getUuidLow(long metadata, long codeOffset, long codeLength); public static Parser create() { + initializeLibraries(); var state = allocState(); return new Parser(state); } diff --git a/lib/rust/parser/generate-java/src/bin/java-tests.rs b/lib/rust/parser/generate-java/src/bin/java-tests.rs index e664e7b965e4..daf00cc87dd7 100644 --- a/lib/rust/parser/generate-java/src/bin/java-tests.rs +++ b/lib/rust/parser/generate-java/src/bin/java-tests.rs @@ -28,6 +28,7 @@ fn main() { println!("import java.nio.ByteOrder;"); println!(); println!("class GeneratedFormatTests {{"); + println!(" private static final Object INIT = {package}.Parser.create();"); println!(" private static java.util.Vector accept;"); println!(" private static java.util.Vector reject;"); for (i, case) in cases.accept.iter().enumerate() { diff --git a/std-bits/base/src/main/java/org/enso/base/enso_cloud/audit/AuditLogAPI.java b/std-bits/base/src/main/java/org/enso/base/enso_cloud/audit/AuditLogAPI.java index 302027aa24fa..9383eee86735 100644 --- a/std-bits/base/src/main/java/org/enso/base/enso_cloud/audit/AuditLogAPI.java +++ b/std-bits/base/src/main/java/org/enso/base/enso_cloud/audit/AuditLogAPI.java @@ -22,8 +22,7 @@ class AuditLogAPI { private static final Logger logger = Logger.getLogger(AuditLogAPI.class.getName()); public static AuditLogAPI INSTANCE = new AuditLogAPI(); - private final HttpClient httpClient = - HttpClient.newBuilder().followRedirects(HttpClient.Redirect.ALWAYS).build(); + private HttpClient httpClient; private final ExecutorService executorService; private AuditLogAPI() { @@ -70,6 +69,9 @@ private HttpRequest buildRequest(LogMessage message) { private void sendLogRequest(HttpRequest request, int retryCount) throws RequestFailureException { try { try { + if (httpClient == null) { + httpClient = HttpClient.newBuilder().followRedirects(HttpClient.Redirect.ALWAYS).build(); + } HttpResponse response = httpClient.send(request, HttpResponse.BodyHandlers.ofString()); if (response.statusCode() < 200 || response.statusCode() >= 300) { diff --git a/test/Base_Tests/src/Data/Text_Spec.enso b/test/Base_Tests/src/Data/Text_Spec.enso index 389b3d068544..3cc255207d7e 100644 --- a/test/Base_Tests/src/Data/Text_Spec.enso +++ b/test/Base_Tests/src/Data/Text_Spec.enso @@ -62,7 +62,7 @@ add_specs suite_builder = accent_1 = '\u00E9' accent_2 = '\u0065\u{301}' - suite_builder.group "Text" group_builder-> + suite_builder.group "Text - general" group_builder-> kshi = '\u0915\u094D\u0937\u093F' facepalm = '\u{1F926}\u{1F3FC}\u200D\u2642\uFE0F' utf_8_whitespace = 'foo\n bar baz \u202F quux' @@ -1354,7 +1354,7 @@ add_specs suite_builder = txt.find "a[bc]" . text 0 . should_equal "ab" txt.find_all "a[bc]" . map (match-> match.text 0) . should_equal ["ab", "ac"] - suite_builder.group "Regex: find and find_all" group_builder-> + suite_builder.group "Text.Regex: find and find_all" group_builder-> group_builder.specify "should be possible on text" <| "My Text: Goes Here".find "^My Text: (.+)$" . text 0 . should_equal "My Text: Goes Here" @@ -1476,7 +1476,7 @@ add_specs suite_builder = locale = Locale.new "en" "GB" "UTF-8" 'a'.match 'a' case_sensitivity=(Case_Sensitivity.Insensitive locale) . should_fail_with Illegal_Argument - suite_builder.group "Regex splitting" group_builder-> + suite_builder.group "Text.Regex splitting" group_builder-> group_builder.specify "should be possible on text" <| splits = "abcde".split "[bd]" use_regex=True splits.length . should_equal 3 @@ -1498,7 +1498,7 @@ add_specs suite_builder = splits.at 1 . should_equal "a" splits.at 2 . should_equal "a" - suite_builder.group "Regex tokenizing" group_builder-> + suite_builder.group "Text.Regex tokenizing" group_builder-> group_builder.specify "can tokenize with simple regexes without capturing groups" "1-800-regex-yes" . tokenize "[a-z]+" . should_equal ["regex", "yes"] "1-800-REGEX-YES" . tokenize "[a-z]+" case_sensitivity=Case_Sensitivity.Insensitive . should_equal ["REGEX", "YES"] diff --git a/tools/legal-review/engine/com.google.errorprone.error_prone_annotations-2.18.0/copyright-keep b/tools/legal-review/engine/com.google.errorprone.error_prone_annotations-2.18.0/copyright-keep deleted file mode 100644 index e234df55170b..000000000000 --- a/tools/legal-review/engine/com.google.errorprone.error_prone_annotations-2.18.0/copyright-keep +++ /dev/null @@ -1,5 +0,0 @@ -Copyright 2014 The Error Prone Authors. -Copyright 2015 The Error Prone Authors. -Copyright 2016 The Error Prone Authors. -Copyright 2017 The Error Prone Authors. -Copyright 2021 The Error Prone Authors. diff --git a/tools/legal-review/engine/com.google.guava.failureaccess-1.0.1/copyright-keep-context b/tools/legal-review/engine/com.google.guava.failureaccess-1.0.1/copyright-keep-context deleted file mode 100644 index 78171f905f2f..000000000000 --- a/tools/legal-review/engine/com.google.guava.failureaccess-1.0.1/copyright-keep-context +++ /dev/null @@ -1 +0,0 @@ -Copyright (C) 2018 The Guava Authors diff --git a/tools/legal-review/engine/com.google.guava.guava-32.0.0-jre/copyright-ignore b/tools/legal-review/engine/com.google.guava.guava-32.0.0-jre/copyright-ignore deleted file mode 100644 index ea2f7d507fc5..000000000000 --- a/tools/legal-review/engine/com.google.guava.guava-32.0.0-jre/copyright-ignore +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2005 The Guava Authors -Copyright (C) 2006 The Guava Authors -Copyright (C) 2007 The Guava Authors -Copyright (C) 2008 The Guava Authors -Copyright (C) 2009 The Guava Authors -Copyright (C) 2010 The Guava Authors -Copyright (C) 2011 The Guava Authors -Copyright (C) 2011 The Guava Authors. -Copyright (C) 2012 The Guava Authors -Copyright (C) 2013 The Guava Authors -Copyright (C) 2014 The Guava Authors -Copyright (C) 2015 The Guava Authors -Copyright (C) 2016 The Guava Authors -Copyright (C) 2017 The Guava Authors -Copyright (C) 2018 The Guava Authors -Copyright (C) 2019 The Guava Authors -Copyright (C) 2020 The Guava Authors -Copyright 2019 The Guava Authors -hereby disclaims copyright to this source code. diff --git a/tools/legal-review/engine/com.google.guava.guava-32.0.0-jre/copyright-keep b/tools/legal-review/engine/com.google.guava.guava-32.0.0-jre/copyright-keep deleted file mode 100644 index fba50dc4b352..000000000000 --- a/tools/legal-review/engine/com.google.guava.guava-32.0.0-jre/copyright-keep +++ /dev/null @@ -1,3 +0,0 @@ -Copyright (C) 2021 The Guava Authors -Copyright 2011 Google Inc. All Rights Reserved. -domain. The author hereby disclaims copyright to this source code. diff --git a/tools/legal-review/engine/com.google.guava.guava-32.0.0-jre/files-ignore b/tools/legal-review/engine/com.google.guava.guava-32.0.0-jre/files-ignore deleted file mode 100644 index b9005a4d5ae7..000000000000 --- a/tools/legal-review/engine/com.google.guava.guava-32.0.0-jre/files-ignore +++ /dev/null @@ -1 +0,0 @@ -META-INF/LICENSE diff --git a/tools/legal-review/engine/com.google.j2objc.j2objc-annotations-2.8/copyright-keep b/tools/legal-review/engine/com.google.j2objc.j2objc-annotations-2.8/copyright-keep deleted file mode 100644 index 0b517a543509..000000000000 --- a/tools/legal-review/engine/com.google.j2objc.j2objc-annotations-2.8/copyright-keep +++ /dev/null @@ -1 +0,0 @@ -Copyright 2012 Google Inc. All Rights Reserved. diff --git a/tools/legal-review/engine/org.checkerframework.checker-qual-3.33.0/copyright-add b/tools/legal-review/engine/org.checkerframework.checker-qual-3.33.0/copyright-add deleted file mode 100644 index a4b7bb99c547..000000000000 --- a/tools/legal-review/engine/org.checkerframework.checker-qual-3.33.0/copyright-add +++ /dev/null @@ -1,4 +0,0 @@ -This program only distributes portions of the module contained in one of the checker-qual*.jar files, -so as described in the attached LICENSE.txt, only the MIT license applies. -The LGPL license is included for completeness, but it does not apply in our usecase, -as we only distribute the MIT-licensed components. diff --git a/tools/legal-review/engine/org.checkerframework.checker-qual-3.33.0/custom-license b/tools/legal-review/engine/org.checkerframework.checker-qual-3.33.0/custom-license deleted file mode 100644 index 35252fda76e8..000000000000 --- a/tools/legal-review/engine/org.checkerframework.checker-qual-3.33.0/custom-license +++ /dev/null @@ -1 +0,0 @@ -LICENSE.txt diff --git a/tools/legal-review/engine/org.checkerframework.checker-qual-3.33.0/files-add/LICENSE.txt b/tools/legal-review/engine/org.checkerframework.checker-qual-3.33.0/files-add/LICENSE.txt deleted file mode 100644 index 70d6a70fe2fb..000000000000 --- a/tools/legal-review/engine/org.checkerframework.checker-qual-3.33.0/files-add/LICENSE.txt +++ /dev/null @@ -1,414 +0,0 @@ -The Checker Framework -Copyright 2004-present by the Checker Framework developers - - -Most of the Checker Framework is licensed under the GNU General Public -License, version 2 (GPL2), with the classpath exception. The text of this -license appears below. This is the same license used for OpenJDK. - -A few parts of the Checker Framework have more permissive licenses, notably -the parts that you might want to include with your own program. - - * The annotations and utility files are licensed under the MIT License. - (The text of this license also appears below.) This applies to the - checker-qual*.jar and all the files that appear in it: every file in a - qual/ directory, plus utility files FormatUtil.java, - I18nFormatUtil.java, NullnessUtil.java, Opt.java, PurityUnqualified.java, - RegexUtil.java, SignednessUtil.java, SignednessUtilExtra.java, and - UnitsTools.java. It also applies to the cleanroom implementations of - third-party annotations (in checker/src/testannotations/ and in - framework/src/main/java/org/jmlspecs/). - -The Checker Framework includes annotations for some libraries. Those in -.astub files use the MIT License. Those in https://github.com/typetools/jdk -(which appears in the annotated-jdk directory of file checker.jar) use the -GPL2 license. - -Some external libraries that are included with the Checker Framework -distribution have different licenses. Here are some examples. - - * javaparser is dual licensed under the LGPL or the Apache license -- you - may use it under whichever one you want. (The javaparser source code - contains a file with the text of the GPL, but it is not clear why, since - javaparser does not use the GPL.) See - https://github.com/typetools/stubparser . - - * Annotation Tools (https://github.com/typetools/annotation-tools) uses - the MIT license. - - * Libraries in plume-lib (https://github.com/plume-lib/) are licensed - under the MIT License. - -=========================================================================== - -The GNU General Public License (GPL) - -Version 2, June 1991 - -Copyright (C) 1989, 1991 Free Software Foundation, Inc. -59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Everyone is permitted to copy and distribute verbatim copies of this license -document, but changing it is not allowed. - -Preamble - -The licenses for most software are designed to take away your freedom to share -and change it. By contrast, the GNU General Public License is intended to -guarantee your freedom to share and change free software--to make sure the -software is free for all its users. This General Public License applies to -most of the Free Software Foundation's software and to any other program whose -authors commit to using it. (Some other Free Software Foundation software is -covered by the GNU Library General Public License instead.) You can apply it to -your programs, too. - -When we speak of free software, we are referring to freedom, not price. Our -General Public Licenses are designed to make sure that you have the freedom to -distribute copies of free software (and charge for this service if you wish), -that you receive source code or can get it if you want it, that you can change -the software or use pieces of it in new free programs; and that you know you -can do these things. - -To protect your rights, we need to make restrictions that forbid anyone to deny -you these rights or to ask you to surrender the rights. These restrictions -translate to certain responsibilities for you if you distribute copies of the -software, or if you modify it. - -For example, if you distribute copies of such a program, whether gratis or for -a fee, you must give the recipients all the rights that you have. You must -make sure that they, too, receive or can get the source code. And you must -show them these terms so they know their rights. - -We protect your rights with two steps: (1) copyright the software, and (2) -offer you this license which gives you legal permission to copy, distribute -and/or modify the software. - -Also, for each author's protection and ours, we want to make certain that -everyone understands that there is no warranty for this free software. If the -software is modified by someone else and passed on, we want its recipients to -know that what they have is not the original, so that any problems introduced -by others will not reflect on the original authors' reputations. - -Finally, any free program is threatened constantly by software patents. We -wish to avoid the danger that redistributors of a free program will -individually obtain patent licenses, in effect making the program proprietary. -To prevent this, we have made it clear that any patent must be licensed for -everyone's free use or not licensed at all. - -The precise terms and conditions for copying, distribution and modification -follow. - -TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - -0. This License applies to any program or other work which contains a notice -placed by the copyright holder saying it may be distributed under the terms of -this General Public License. The "Program", below, refers to any such program -or work, and a "work based on the Program" means either the Program or any -derivative work under copyright law: that is to say, a work containing the -Program or a portion of it, either verbatim or with modifications and/or -translated into another language. (Hereinafter, translation is included -without limitation in the term "modification".) Each licensee is addressed as -"you". - -Activities other than copying, distribution and modification are not covered by -this License; they are outside its scope. The act of running the Program is -not restricted, and the output from the Program is covered only if its contents -constitute a work based on the Program (independent of having been made by -running the Program). Whether that is true depends on what the Program does. - -1. You may copy and distribute verbatim copies of the Program's source code as -you receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice and -disclaimer of warranty; keep intact all the notices that refer to this License -and to the absence of any warranty; and give any other recipients of the -Program a copy of this License along with the Program. - -You may charge a fee for the physical act of transferring a copy, and you may -at your option offer warranty protection in exchange for a fee. - -2. You may modify your copy or copies of the Program or any portion of it, thus -forming a work based on the Program, and copy and distribute such modifications -or work under the terms of Section 1 above, provided that you also meet all of -these conditions: - - a) You must cause the modified files to carry prominent notices stating - that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in whole or - in part contains or is derived from the Program or any part thereof, to be - licensed as a whole at no charge to all third parties under the terms of - this License. - - c) If the modified program normally reads commands interactively when run, - you must cause it, when started running for such interactive use in the - most ordinary way, to print or display an announcement including an - appropriate copyright notice and a notice that there is no warranty (or - else, saying that you provide a warranty) and that users may redistribute - the program under these conditions, and telling the user how to view a copy - of this License. (Exception: if the Program itself is interactive but does - not normally print such an announcement, your work based on the Program is - not required to print an announcement.) - -These requirements apply to the modified work as a whole. If identifiable -sections of that work are not derived from the Program, and can be reasonably -considered independent and separate works in themselves, then this License, and -its terms, do not apply to those sections when you distribute them as separate -works. But when you distribute the same sections as part of a whole which is a -work based on the Program, the distribution of the whole must be on the terms -of this License, whose permissions for other licensees extend to the entire -whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest your -rights to work written entirely by you; rather, the intent is to exercise the -right to control the distribution of derivative or collective works based on -the Program. - -In addition, mere aggregation of another work not based on the Program with the -Program (or with a work based on the Program) on a volume of a storage or -distribution medium does not bring the other work under the scope of this -License. - -3. You may copy and distribute the Program (or a work based on it, under -Section 2) in object code or executable form under the terms of Sections 1 and -2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable source - code, which must be distributed under the terms of Sections 1 and 2 above - on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three years, to - give any third party, for a charge no more than your cost of physically - performing source distribution, a complete machine-readable copy of the - corresponding source code, to be distributed under the terms of Sections 1 - and 2 above on a medium customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer to - distribute corresponding source code. (This alternative is allowed only - for noncommercial distribution and only if you received the program in - object code or executable form with such an offer, in accord with - Subsection b above.) - -The source code for a work means the preferred form of the work for making -modifications to it. For an executable work, complete source code means all -the source code for all modules it contains, plus any associated interface -definition files, plus the scripts used to control compilation and installation -of the executable. However, as a special exception, the source code -distributed need not include anything that is normally distributed (in either -source or binary form) with the major components (compiler, kernel, and so on) -of the operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the source -code from the same place counts as distribution of the source code, even though -third parties are not compelled to copy the source along with the object code. - -4. You may not copy, modify, sublicense, or distribute the Program except as -expressly provided under this License. Any attempt otherwise to copy, modify, -sublicense or distribute the Program is void, and will automatically terminate -your rights under this License. However, parties who have received copies, or -rights, from you under this License will not have their licenses terminated so -long as such parties remain in full compliance. - -5. You are not required to accept this License, since you have not signed it. -However, nothing else grants you permission to modify or distribute the Program -or its derivative works. These actions are prohibited by law if you do not -accept this License. Therefore, by modifying or distributing the Program (or -any work based on the Program), you indicate your acceptance of this License to -do so, and all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - -6. Each time you redistribute the Program (or any work based on the Program), -the recipient automatically receives a license from the original licensor to -copy, distribute or modify the Program subject to these terms and conditions. -You may not impose any further restrictions on the recipients' exercise of the -rights granted herein. You are not responsible for enforcing compliance by -third parties to this License. - -7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), conditions -are imposed on you (whether by court order, agreement or otherwise) that -contradict the conditions of this License, they do not excuse you from the -conditions of this License. If you cannot distribute so as to satisfy -simultaneously your obligations under this License and any other pertinent -obligations, then as a consequence you may not distribute the Program at all. -For example, if a patent license would not permit royalty-free redistribution -of the Program by all those who receive copies directly or indirectly through -you, then the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply and -the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any patents or -other property right claims or to contest validity of any such claims; this -section has the sole purpose of protecting the integrity of the free software -distribution system, which is implemented by public license practices. Many -people have made generous contributions to the wide range of software -distributed through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing to -distribute software through any other system and a licensee cannot impose that -choice. - -This section is intended to make thoroughly clear what is believed to be a -consequence of the rest of this License. - -8. If the distribution and/or use of the Program is restricted in certain -countries either by patents or by copyrighted interfaces, the original -copyright holder who places the Program under this License may add an explicit -geographical distribution limitation excluding those countries, so that -distribution is permitted only in or among countries not thus excluded. In -such case, this License incorporates the limitation as if written in the body -of this License. - -9. The Free Software Foundation may publish revised and/or new versions of the -General Public License from time to time. Such new versions will be similar in -spirit to the present version, but may differ in detail to address new problems -or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any later -version", you have the option of following the terms and conditions either of -that version or of any later version published by the Free Software Foundation. -If the Program does not specify a version number of this License, you may -choose any version ever published by the Free Software Foundation. - -10. If you wish to incorporate parts of the Program into other free programs -whose distribution conditions are different, write to the author to ask for -permission. For software which is copyrighted by the Free Software Foundation, -write to the Free Software Foundation; we sometimes make exceptions for this. -Our decision will be guided by the two goals of preserving the free status of -all derivatives of our free software and of promoting the sharing and reuse of -software generally. - -NO WARRANTY - -11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR -THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE -STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE -PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, -INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND -PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, -YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - -12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL -ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE -PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR -INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA -BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER -OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -END OF TERMS AND CONDITIONS - -How to Apply These Terms to Your New Programs - -If you develop a new program, and you want it to be of the greatest possible -use to the public, the best way to achieve this is to make it free software -which everyone can redistribute and change under these terms. - -To do so, attach the following notices to the program. It is safest to attach -them to the start of each source file to most effectively convey the exclusion -of warranty; and each file should have at least the "copyright" line and a -pointer to where the full notice is found. - - One line to give the program's name and a brief idea of what it does. - - Copyright (C) - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the Free - Software Foundation; either version 2 of the License, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., 59 - Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this when it -starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author Gnomovision comes - with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free - software, and you are welcome to redistribute it under certain conditions; - type 'show c' for details. - -The hypothetical commands 'show w' and 'show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may be -called something other than 'show w' and 'show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your school, -if any, to sign a "copyright disclaimer" for the program, if necessary. Here -is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - 'Gnomovision' (which makes passes at compilers) written by James Hacker. - - signature of Ty Coon, 1 April 1989 - - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General Public -License instead of this License. - - -"CLASSPATH" EXCEPTION TO THE GPL - -Certain source files distributed by Oracle America and/or its affiliates are -subject to the following clarification and special exception to the GPL, but -only where Oracle has expressly included in the particular source file's header -the words "Oracle designates this particular file as subject to the "Classpath" -exception as provided by Oracle in the LICENSE file that accompanied this code." - - Linking this library statically or dynamically with other modules is making - a combined work based on this library. Thus, the terms and conditions of - the GNU General Public License cover the whole combination. - - As a special exception, the copyright holders of this library give you - permission to link this library with independent modules to produce an - executable, regardless of the license terms of these independent modules, - and to copy and distribute the resulting executable under terms of your - choice, provided that you also meet, for each linked independent module, - the terms and conditions of the license of that module. An independent - module is a module which is not derived from or based on this library. If - you modify this library, you may extend this exception to your version of - the library, but you are not obligated to do so. If you do not wish to do - so, delete this exception statement from your version. - -=========================================================================== - -MIT License: - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -=========================================================================== diff --git a/tools/legal-review/engine/org.checkerframework.checker-qual-3.33.0/files-keep b/tools/legal-review/engine/org.checkerframework.checker-qual-3.33.0/files-keep deleted file mode 100644 index 0256724c8d06..000000000000 --- a/tools/legal-review/engine/org.checkerframework.checker-qual-3.33.0/files-keep +++ /dev/null @@ -1 +0,0 @@ -META-INF/LICENSE.txt diff --git a/tools/legal-review/engine/report-state b/tools/legal-review/engine/report-state index 44e64adeb3af..9ae8126bf8db 100644 --- a/tools/legal-review/engine/report-state +++ b/tools/legal-review/engine/report-state @@ -1,3 +1,3 @@ -D0D1595E3558C5D3E4E1D040FFF078F2EE815059BA46F1BA0AF546A524303AC0 -3768984C1A9E71A22E77ED4EFEBA08B9A2BA4A8EB9220E5B206B67F9B58FDFDF +F97FB4D3980033CF50C4A0BFE96165C67BAABD39BB8F1802C704F93B425B9A28 +76B24D1E8F678DA196FA65B3D292B82789F2CE19ADCEE20F8F233E82033328BC 0