Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package haxe for openSUSE:Factory checked in at 2023-04-13 14:10:32 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/haxe (Old) and /work/SRC/openSUSE:Factory/.haxe.new.19717 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "haxe" Thu Apr 13 14:10:32 2023 rev:22 rq:1078735 version:4.3.0 Changes: -------- --- /work/SRC/openSUSE:Factory/haxe/haxe.changes 2022-04-06 21:52:25.322929959 +0200 +++ /work/SRC/openSUSE:Factory/.haxe.new.19717/haxe.changes 2023-04-13 14:10:42.968285756 +0200 @@ -1,0 +2,27 @@ +Wed Apr 12 14:01:11 UTC 2023 - Andy Li <a...@onthewings.net> + +- Update to 4.3.0 + * New features: + * support defaults for type parameters + * support @:op(a()) on abstracts + * support abstract keyword to reference the abstract + * support static var at expression-level + * support ?. safe navigation operator + * added ?? null coalescing operator + * add -w compiler option to configure warnings + * added new error reporting modes + * support custom metadata and defines + * Standard Library: + * added atomic operations to several targets + * added Vector.fill + * added sys.thread.Condition and Semaphore + * added Http.getResponseHeaderValues to deal with multiple values of same key + * make Sys.environment consistent between targets + * consistent way to unset environment variables with Sys.putEnv + * Various improvements and bug fixes detailed in + https://github.com/HaxeFoundation/haxe/blob/4.3.0/extra/CHANGES.txt + * Update haxelib to 4.1.0 + * Added support for documenting custom defines and metadata (#573) + * Fixed a segmentation fault on Linux systems + +------------------------------------------------------------------- Old: ---- haxe-4.2.5.tar.gz haxelib-4b27f91d8a4ff279d9903091680fee2c93a0d574.tar.gz New: ---- haxe-4.3.0.tar.gz haxelib-f17fffa97554b1bdba37750e3418051f017a5bc2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ haxe.spec ++++++ --- /var/tmp/diff_new_pack.KZc03W/_old 2023-04-13 14:10:43.552289109 +0200 +++ /var/tmp/diff_new_pack.KZc03W/_new 2023-04-13 14:10:43.560289155 +0200 @@ -15,11 +15,11 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -%global commit_haxelib 4b27f91d8a4ff279d9903091680fee2c93a0d574 +%global commit_haxelib f17fffa97554b1bdba37750e3418051f017a5bc2 %global commit_hx3compat f1f18201e5c0479cb5adf5f6028788b37f37b730 Name: haxe -Version: 4.2.5 +Version: 4.3.0 Release: 0 Summary: Multiplatform programming language License: GPL-2.0+ and MIT @@ -47,7 +47,7 @@ BuildRequires: ocamlfind(sha) BuildRequires: ocamlfind(xml-light) BuildRequires: pkgconfig(zlib) -BuildRequires: pcre-devel-static +BuildRequires: pcre2-devel BuildRequires: mbedtls-devel BuildRequires: cmake Requires: neko >= 2.3.0 ++++++ haxe-4.2.5.tar.gz -> haxe-4.3.0.tar.gz ++++++ /work/SRC/openSUSE:Factory/haxe/haxe-4.2.5.tar.gz /work/SRC/openSUSE:Factory/.haxe.new.19717/haxe-4.3.0.tar.gz differ: char 12, line 1 ++++++ haxelib-4b27f91d8a4ff279d9903091680fee2c93a0d574.tar.gz -> haxelib-f17fffa97554b1bdba37750e3418051f017a5bc2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/haxelib-4b27f91d8a4ff279d9903091680fee2c93a0d574/CHANGES.md new/haxelib-f17fffa97554b1bdba37750e3418051f017a5bc2/CHANGES.md --- old/haxelib-4b27f91d8a4ff279d9903091680fee2c93a0d574/CHANGES.md 2019-11-11 15:50:28.000000000 +0100 +++ new/haxelib-f17fffa97554b1bdba37750e3418051f017a5bc2/CHANGES.md 2023-04-04 16:27:26.000000000 +0200 @@ -1,3 +1,12 @@ +## 4.1.0 (2023-04-06) + + - Added support for documenting custom defines and metadata ([#573](https://github.com/HaxeFoundation/haxelib/pull/573)) + - Fixed a segmentation fault on Linux systems + +## 4.0.3 (2023-02-27) + - Fixed large git installations hanging on windows ([#585](https://github.com/HaxeFoundation/haxelib/pull/585)) + - Corrected license in haxelib.json ([#535](https://github.com/HaxeFoundation/haxelib/pull/535)) + ## 4.0.2 (2019-11-11) - Fixed too strict requirements to haxelib.json data for private libs ([#484](https://github.com/HaxeFoundation/haxelib/issues/484)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/haxelib-4b27f91d8a4ff279d9903091680fee2c93a0d574/haxelib.json new/haxelib-f17fffa97554b1bdba37750e3418051f017a5bc2/haxelib.json --- old/haxelib-4b27f91d8a4ff279d9903091680fee2c93a0d574/haxelib.json 2019-11-11 15:50:28.000000000 +0100 +++ new/haxelib-f17fffa97554b1bdba37750e3418051f017a5bc2/haxelib.json 2023-04-04 16:27:26.000000000 +0200 @@ -1,11 +1,11 @@ { "name": "haxelib", "url" : "https://lib.haxe.org/documentation/", - "license": "GPL", + "license": "MIT", "tags": ["haxelib", "core"], "description": "The haxelib client", "classPath": "src", - "version": "4.0.2", - "releasenote": " * Fixed too strict requirements to haxelib.json data for private libs (#484)", + "version": "4.1.0", + "releasenote": "Added support for documenting custom defines and metadata (#573)", "contributors": ["HaxeFoundation", "back2dos", "ncannasse", "jason", "Simn", "nadako", "andyli"] } Binary files old/haxelib-4b27f91d8a4ff279d9903091680fee2c93a0d574/run.n and new/haxelib-f17fffa97554b1bdba37750e3418051f017a5bc2/run.n differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/haxelib-4b27f91d8a4ff279d9903091680fee2c93a0d574/schema.json new/haxelib-f17fffa97554b1bdba37750e3418051f017a5bc2/schema.json --- old/haxelib-4b27f91d8a4ff279d9903091680fee2c93a0d574/schema.json 2019-11-11 15:50:28.000000000 +0100 +++ new/haxelib-f17fffa97554b1bdba37750e3418051f017a5bc2/schema.json 2023-04-04 16:27:26.000000000 +0200 @@ -47,6 +47,21 @@ }, "additionalProperties": false }, + "documentation": { + "type": "object", + "description": "Project's documentation resources", + "properties": { + "defines": { + "type": "string", + "description": "Relative path to json file describing this project's custom defines" + }, + "metadata": { + "type": "string", + "description": "Relative path to json file describing this project's custom metadata" + } + }, + "additionalProperties": false + }, "releasenote": { "description": "Short description of changes made in this version", "type": "string" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/haxelib-4b27f91d8a4ff279d9903091680fee2c93a0d574/src/haxelib/Data.hx new/haxelib-f17fffa97554b1bdba37750e3418051f017a5bc2/src/haxelib/Data.hx --- old/haxelib-4b27f91d8a4ff279d9903091680fee2c93a0d574/src/haxelib/Data.hx 2019-11-11 15:50:28.000000000 +0100 +++ new/haxelib-f17fffa97554b1bdba37750e3418051f017a5bc2/src/haxelib/Data.hx 2023-04-04 16:27:26.000000000 +0200 @@ -171,7 +171,35 @@ var contributors : Array<String>; @:optional var tags : Array<String>; @:optional var dependencies : Dependencies; - @:optional var main:String; + @:optional var main : String; + @:optional var documentation : LibraryDocumentation; +} + +/** Documentation data held in the `documentation` field of the `haxelib.json` file. **/ +typedef LibraryDocumentation = { + @:optional var defines : String; + @:optional var metadata : String; +} + +/** Metadata documentation data as should be declared in the json linked in the + * `documentation.metadata` field of the `haxelib.json` file. **/ +typedef MetadataDocumentation = { + var metadata : String; + var doc : String; + @:optional var platforms : Array<String>; + @:optional var params : Array<String>; + @:optional var targets : Array<String>; + @:optional var links : Array<String>; +} + +/** Define documentation data as should be declared in the json linked in the + * `documentation.defines` field of the `haxelib.json` file. **/ +typedef DefineDocumentation = { + var define : String; + var doc : String; + @:optional var platforms : Array<String>; + @:optional var params : Array<String>; + @:optional var links : Array<String>; } @:enum abstract License(String) to String { @@ -330,6 +358,48 @@ } } + /** Throws an exception if files referenced in `documentation` field of an `infos` do not exist or are invalid **/ + public static function checkDocumentation( zip : List<Entry>, infos : Infos ) { + if (infos.documentation == null) return; + + var hasDefines = infos.documentation.defines != null; + var hasMetadata = infos.documentation.metadata != null; + if (!hasDefines && !hasMetadata) return; + + var basePath = Data.locateBasePath(zip); + var definesPath = hasDefines ? basePath + infos.documentation.defines : null; + var metadataPath = hasMetadata ? basePath + infos.documentation.metadata : null; + var definesFound = false; + var metadataFound = false; + + for (f in zip) { + if (hasDefines && StringTools.startsWith(f.fileName, definesPath)) { + definesFound = true; + try { + var jsondata = Reader.unzip(f).toString(); + var defines:Array<DefineDocumentation> = Json.parse(jsondata); + Validator.validate(defines); + } catch (_:Dynamic) { + throw 'Defines documentation json file does not match expected format'; + } + } else if (hasMetadata && StringTools.startsWith(f.fileName, metadataPath)) { + metadataFound = true; + try { + var jsondata = Reader.unzip(f).toString(); + var metas:Array<MetadataDocumentation> = Json.parse(jsondata); + Validator.validate(metas); + } catch (_:Dynamic) { + throw 'Metadata documentation json file does not match expected format'; + } + } + + if ((!hasDefines || definesFound) && (!hasMetadata || metadataFound)) break; + } + + if (hasDefines && !definesFound) throw 'Json file `${infos.documentation.defines}` not found'; + if (hasMetadata && !metadataFound) throw 'Json file `${infos.documentation.metadata}` not found'; + } + public static function readData( jsondata: String, check : CheckLevel ) : Infos { var doc:Infos = try Json.parse(jsondata) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/haxelib-4b27f91d8a4ff279d9903091680fee2c93a0d574/src/haxelib/client/Main.hx new/haxelib-f17fffa97554b1bdba37750e3418051f017a5bc2/src/haxelib/client/Main.hx --- old/haxelib-4b27f91d8a4ff279d9903091680fee2c93a0d574/src/haxelib/client/Main.hx 2019-11-11 15:50:28.000000000 +0100 +++ new/haxelib-f17fffa97554b1bdba37750e3418051f017a5bc2/src/haxelib/client/Main.hx 2023-04-04 16:27:26.000000000 +0200 @@ -634,6 +634,7 @@ var infos = Data.readInfos(zip,true); Data.checkClassPath(zip, infos); + Data.checkDocumentation(zip, infos); var user:String = infos.contributors[0]; @@ -1502,6 +1503,25 @@ Sys.println(dir); Sys.println("-D " + d.project + "="+d.info.version); + + if (d.info.documentation != null) { + var doc = d.info.documentation; + + // we'll have to change this to "4.3.0" after the release + if (haxeVersion() >= SemVer.ofString("4.3.0-rc.1")) { + // custom defines if defined + if (doc.defines != null && doc.defines != "") { + var path = Path.join([d.dir, doc.defines]); + Sys.println('--macro registerDefinesDescriptionFile(\'$path\', \'${d.info.name}\')'); + } + + // custom metadatas if defined + if (doc.metadata != null && doc.metadata != "") { + var path = Path.join([d.dir, doc.metadata]); + Sys.println('--macro registerMetadataDescriptionFile(\'$path\', \'${d.info.name}\')'); + } + } + } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/haxelib-4b27f91d8a4ff279d9903091680fee2c93a0d574/src/haxelib/client/Vcs.hx new/haxelib-f17fffa97554b1bdba37750e3418051f017a5bc2/src/haxelib/client/Vcs.hx --- old/haxelib-4b27f91d8a4ff279d9903091680fee2c93a0d574/src/haxelib/client/Vcs.hx 2019-11-11 15:50:28.000000000 +0100 +++ new/haxelib-f17fffa97554b1bdba37750e3418051f017a5bc2/src/haxelib/client/Vcs.hx 2023-04-04 16:27:26.000000000 +0200 @@ -22,6 +22,13 @@ package haxelib.client; import sys.FileSystem; +#if haxe4 +import sys.thread.Thread; +import sys.thread.Lock; +#else +import neko.vm.Thread; +import neko.vm.Lock; +#end using haxelib.client.Vcs; interface IVcs { @@ -151,18 +158,47 @@ code: -1, out: Std.string(e) } - } - var out = p.stdout.readAll().toString(); - var err = p.stderr.readAll().toString(); - if (settings.debug && out != "") - Sys.println(out); - if (settings.debug && err != "") - Sys.stderr().writeString(err); - var code = p.exitCode(); - var ret = { - code: code, - out: code == 0 ? out : err - }; + }; + var ret = if (Sys.systemName() == "Windows") { + var streamsLock = new sys.thread.Lock(); + function readFrom(stream:haxe.io.Input, to: {value: String}) { + to.value = stream.readAll().toString(); + streamsLock.release(); + } + + var out = {value: ""}; + var err = {value: ""}; + Thread.create(readFrom.bind(p.stdout, out)); + Thread.create(readFrom.bind(p.stderr, err)); + + var code = p.exitCode(); + for (_ in 0...2) { + // wait until we finish reading from both streams + streamsLock.wait(); + } + + if (settings.debug && out.value != "") + Sys.println(out.value); + if (settings.debug && err.value != "") + Sys.stderr().writeString(err.value); + + { + code: code, + out: code == 0 ? out.value : err.value + }; + } else { + var out = p.stdout.readAll().toString(); + var err = p.stderr.readAll().toString(); + if (settings.debug && out != "") + Sys.println(out); + if (settings.debug && err != "") + Sys.stderr().writeString(err); + var code = p.exitCode(); + { + code: code, + out: code == 0 ? out : err + }; + }; p.close(); return ret; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/haxelib-4b27f91d8a4ff279d9903091680fee2c93a0d574/test/libraries/libBadDefineJson/doc/defines.json new/haxelib-f17fffa97554b1bdba37750e3418051f017a5bc2/test/libraries/libBadDefineJson/doc/defines.json --- old/haxelib-4b27f91d8a4ff279d9903091680fee2c93a0d574/test/libraries/libBadDefineJson/doc/defines.json 1970-01-01 01:00:00.000000000 +0100 +++ new/haxelib-f17fffa97554b1bdba37750e3418051f017a5bc2/test/libraries/libBadDefineJson/doc/defines.json 2023-04-04 16:27:26.000000000 +0200 @@ -0,0 +1,5 @@ +[ + { + "name": "Malformed define" + } +] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/haxelib-4b27f91d8a4ff279d9903091680fee2c93a0d574/test/libraries/libBadDefineJson/haxelib.json new/haxelib-f17fffa97554b1bdba37750e3418051f017a5bc2/test/libraries/libBadDefineJson/haxelib.json --- old/haxelib-4b27f91d8a4ff279d9903091680fee2c93a0d574/test/libraries/libBadDefineJson/haxelib.json 1970-01-01 01:00:00.000000000 +0100 +++ new/haxelib-f17fffa97554b1bdba37750e3418051f017a5bc2/test/libraries/libBadDefineJson/haxelib.json 2023-04-04 16:27:26.000000000 +0200 @@ -0,0 +1,13 @@ +{ + "name": "BadDefineJson", + "url" : "http://example.org", + "license": "GPL", + "tags": ["bar", "test"], + "description": "This project is an example of an haxelib project", + "version": "1.0.0", + "releasenote": "Initial release, everything is working correctly", + "documentation": { + "defines": "doc/defines.json" + }, + "contributors": ["Bar"] +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/haxelib-4b27f91d8a4ff279d9903091680fee2c93a0d574/test/libraries/libBadMetaJson/doc/meta.json new/haxelib-f17fffa97554b1bdba37750e3418051f017a5bc2/test/libraries/libBadMetaJson/doc/meta.json --- old/haxelib-4b27f91d8a4ff279d9903091680fee2c93a0d574/test/libraries/libBadMetaJson/doc/meta.json 1970-01-01 01:00:00.000000000 +0100 +++ new/haxelib-f17fffa97554b1bdba37750e3418051f017a5bc2/test/libraries/libBadMetaJson/doc/meta.json 2023-04-04 16:27:26.000000000 +0200 @@ -0,0 +1 @@ +This is not a json file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/haxelib-4b27f91d8a4ff279d9903091680fee2c93a0d574/test/libraries/libBadMetaJson/haxelib.json new/haxelib-f17fffa97554b1bdba37750e3418051f017a5bc2/test/libraries/libBadMetaJson/haxelib.json --- old/haxelib-4b27f91d8a4ff279d9903091680fee2c93a0d574/test/libraries/libBadMetaJson/haxelib.json 1970-01-01 01:00:00.000000000 +0100 +++ new/haxelib-f17fffa97554b1bdba37750e3418051f017a5bc2/test/libraries/libBadMetaJson/haxelib.json 2023-04-04 16:27:26.000000000 +0200 @@ -0,0 +1,13 @@ +{ + "name": "BadMetaJson", + "url" : "http://example.org", + "license": "GPL", + "tags": ["bar", "test"], + "description": "This project is an example of an haxelib project", + "version": "1.0.0", + "releasenote": "Initial release, everything is working correctly", + "documentation": { + "metadata": "doc/meta.json" + }, + "contributors": ["Bar"] +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/haxelib-4b27f91d8a4ff279d9903091680fee2c93a0d574/test/libraries/libBadMetaJson2/doc/meta.json new/haxelib-f17fffa97554b1bdba37750e3418051f017a5bc2/test/libraries/libBadMetaJson2/doc/meta.json --- old/haxelib-4b27f91d8a4ff279d9903091680fee2c93a0d574/test/libraries/libBadMetaJson2/doc/meta.json 1970-01-01 01:00:00.000000000 +0100 +++ new/haxelib-f17fffa97554b1bdba37750e3418051f017a5bc2/test/libraries/libBadMetaJson2/doc/meta.json 2023-04-04 16:27:26.000000000 +0200 @@ -0,0 +1,5 @@ +[ + { + "name": "Malformed meta" + } +] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/haxelib-4b27f91d8a4ff279d9903091680fee2c93a0d574/test/libraries/libBadMetaJson2/haxelib.json new/haxelib-f17fffa97554b1bdba37750e3418051f017a5bc2/test/libraries/libBadMetaJson2/haxelib.json --- old/haxelib-4b27f91d8a4ff279d9903091680fee2c93a0d574/test/libraries/libBadMetaJson2/haxelib.json 1970-01-01 01:00:00.000000000 +0100 +++ new/haxelib-f17fffa97554b1bdba37750e3418051f017a5bc2/test/libraries/libBadMetaJson2/haxelib.json 2023-04-04 16:27:26.000000000 +0200 @@ -0,0 +1,13 @@ +{ + "name": "BadMetaJson2", + "url" : "http://example.org", + "license": "GPL", + "tags": ["bar", "test"], + "description": "This project is an example of an haxelib project", + "version": "1.0.0", + "releasenote": "Initial release, everything is working correctly", + "documentation": { + "metadata": "doc/meta.json" + }, + "contributors": ["Bar"] +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/haxelib-4b27f91d8a4ff279d9903091680fee2c93a0d574/test/libraries/libDocumentationFiles/doc/defines.json new/haxelib-f17fffa97554b1bdba37750e3418051f017a5bc2/test/libraries/libDocumentationFiles/doc/defines.json --- old/haxelib-4b27f91d8a4ff279d9903091680fee2c93a0d574/test/libraries/libDocumentationFiles/doc/defines.json 1970-01-01 01:00:00.000000000 +0100 +++ new/haxelib-f17fffa97554b1bdba37750e3418051f017a5bc2/test/libraries/libDocumentationFiles/doc/defines.json 2023-04-04 16:27:26.000000000 +0200 @@ -0,0 +1,13 @@ +[ + { + "define": "test", + "doc": "Test define" + }, + { + "define": "test2", + "doc": "Test define 2", + "platforms": ["eval"], + "params": ["foo"], + "links": ["https://example.com"] + } +] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/haxelib-4b27f91d8a4ff279d9903091680fee2c93a0d574/test/libraries/libDocumentationFiles/doc/meta.json new/haxelib-f17fffa97554b1bdba37750e3418051f017a5bc2/test/libraries/libDocumentationFiles/doc/meta.json --- old/haxelib-4b27f91d8a4ff279d9903091680fee2c93a0d574/test/libraries/libDocumentationFiles/doc/meta.json 1970-01-01 01:00:00.000000000 +0100 +++ new/haxelib-f17fffa97554b1bdba37750e3418051f017a5bc2/test/libraries/libDocumentationFiles/doc/meta.json 2023-04-04 16:27:26.000000000 +0200 @@ -0,0 +1,14 @@ +[ + { + "metadata": ":test", + "doc": "Some test metadata" + }, + { + "metadata": ":test2", + "doc": "Some other test metadata", + "platforms": ["eval"], + "params": ["foo"], + "links": ["https://example.com"], + "targets": ["TClass", "TClassField"] + } +] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/haxelib-4b27f91d8a4ff279d9903091680fee2c93a0d574/test/libraries/libDocumentationFiles/haxelib.json new/haxelib-f17fffa97554b1bdba37750e3418051f017a5bc2/test/libraries/libDocumentationFiles/haxelib.json --- old/haxelib-4b27f91d8a4ff279d9903091680fee2c93a0d574/test/libraries/libDocumentationFiles/haxelib.json 1970-01-01 01:00:00.000000000 +0100 +++ new/haxelib-f17fffa97554b1bdba37750e3418051f017a5bc2/test/libraries/libDocumentationFiles/haxelib.json 2023-04-04 16:27:26.000000000 +0200 @@ -0,0 +1,14 @@ +{ + "name": "DocumentationFiles", + "url" : "http://example.org", + "license": "GPL", + "tags": ["bar", "test"], + "description": "This project is an example of an haxelib project", + "version": "1.0.0", + "releasenote": "Initial release, everything is working correctly", + "documentation": { + "metadata": "doc/meta.json", + "defines": "doc/defines.json" + }, + "contributors": ["Bar"] +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/haxelib-4b27f91d8a4ff279d9903091680fee2c93a0d574/test/libraries/libMissingMetaJson/haxelib.json new/haxelib-f17fffa97554b1bdba37750e3418051f017a5bc2/test/libraries/libMissingMetaJson/haxelib.json --- old/haxelib-4b27f91d8a4ff279d9903091680fee2c93a0d574/test/libraries/libMissingMetaJson/haxelib.json 1970-01-01 01:00:00.000000000 +0100 +++ new/haxelib-f17fffa97554b1bdba37750e3418051f017a5bc2/test/libraries/libMissingMetaJson/haxelib.json 2023-04-04 16:27:26.000000000 +0200 @@ -0,0 +1,13 @@ +{ + "name": "MissingMetaJson", + "url" : "http://example.org", + "license": "GPL", + "tags": ["bar", "test"], + "description": "This project is an example of an haxelib project", + "version": "1.0.0", + "releasenote": "Initial release, everything is working correctly", + "documentation": { + "metadata": "doc/meta.json" + }, + "contributors": ["Bar"] +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/haxelib-4b27f91d8a4ff279d9903091680fee2c93a0d574/test/tests/TestData.hx new/haxelib-f17fffa97554b1bdba37750e3418051f017a5bc2/test/tests/TestData.hx --- old/haxelib-4b27f91d8a4ff279d9903091680fee2c93a0d574/test/tests/TestData.hx 2019-11-11 15:50:28.000000000 +0100 +++ new/haxelib-f17fffa97554b1bdba37750e3418051f017a5bc2/test/tests/TestData.hx 2023-04-04 16:27:26.000000000 +0200 @@ -103,6 +103,27 @@ assertEquals( ok, true ); } + public function testCheckDocumentation() { + var results = [ + "DocumentationFiles" => true, + "BadMetaJson" => false, + "BadMetaJson2" => false, + "BadDefineJson" => false + ]; + + for (r in results.keys()) { + var zip = Reader.readZip(new BytesInput(File.getBytes('test/libraries/lib$r.zip'))); + var info = Data.readInfos(zip, CheckData); + + try { + Data.checkDocumentation(zip,info); + assertTrue(results.get(r)); + } catch (e:Dynamic) { + assertFalse(results.get(r)); + } + } + } + public function testReadDataWithCheck() { assertFalse( readDataOkay("bad json") );