Closed
Bug 397193
Opened 18 years ago
Closed 7 years ago
Use a format easier to read for humans for the update.rdf
Categories
(Other Applications Graveyard :: McCoy, enhancement)
Other Applications Graveyard
McCoy
Tracking
(Not tracked)
RESOLVED
WONTFIX
M2
People
(Reporter: joh_walt, Unassigned)
References
Details
Attachments
(4 files, 8 obsolete files)
|
3.89 KB,
text/plain
|
Details | |
|
14.65 KB,
patch
|
Details | Diff | Splinter Review | |
|
101.60 KB,
patch
|
Details | Diff | Splinter Review | |
|
572.07 KB,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a9pre) Gecko/2007092202 SeaMonkey/2.0a1pre
Build Identifier:
It's quite hard for me to read the update.rdf generated by McCoy for two reasons.
Firstly the components for different extensions are mixed with another
Maybe I should mention that I put all the infos for all my extensions into one update.rdf. I don't know if that's common but it should be respected.
Secondly currently McCoy writes four statements minimum (i.e. if an extension is only for one app, add one more statement for each additional app) to describe an update, linked together by meaningless (for humans) resource identifiers like rdf:#$VakZ52
Isn't it possible to write out or at least retain if it exists a structure like the following?
<RDF:Description about="urn:mozilla:extension:{30c20af7-ec80-4b0f-3e9e-19643a93a784}">
<em:updates>
<RDF:Seq>
<RDF:li resource="urn:mozilla:extension:{30c20af7-ec80-4b0f-3e9e-19643a93a784}:0.1" />
</RDF:Seq>
</em:updates>
</RDF:Description>
<RDF:Description about="urn:mozilla:extension:{30c20af7-ec80-4b0f-3e9e-19643a93a784}:0.1">
<em:version>0.1</em:version>
<em:targetApplication>
<Description em:id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
em:minVersion="1.5"
em:maxVersion="3.0"
em:updateLink="http://example.net/some.xpi"
em:updateHash="sha256:49d2bcf7cf88703cc75e9e77a9a69b363b6be27ec6241795b20f51da2ae6159a" />
</em:targetApplication>
</RDF:Description>
Reproducible: Always
Comment 1•18 years ago
|
||
Yes this is something I'd like to do at some point.
Severity: normal → enhancement
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 2000 → All
Hardware: PC → All
Comment 2•18 years ago
|
||
Comment 3•18 years ago
|
||
Comment on attachment 281965 [details]
Summary of problem
Thank you for your unique input dolske, maybe next time you could add something productive
Attachment #281965 -
Attachment is obsolete: true
Updated•18 years ago
|
Target Milestone: --- → M2
Comment 4•17 years ago
|
||
I apologise for the size of this patch Axel, if you think you won't be able to get through it then I can try to find someone else, it is only for McCoy.
This switches away from using the core RDF APIs for manipulating the RDF files. Instead it adds a new js module that allows for loading an RDF file into a DOM document then provides an API allowing for querying and modifying the DOM document. The API is close to the core RDF. All of the functions in the module are commented for what they do. In addition the traditional assert/unassert style methods there are those made to treat predicates as single value properties which is common in the install.rdf and update.rdf.
The patch also contains surrounding mochitests and switches the McCoy code to use the new RDF module.
Comment 5•17 years ago
|
||
Oops, previous patch had some stuff from a different patch.
Attachment #322091 -
Attachment is obsolete: true
Attachment #322091 -
Flags: review?(axel)
Updated•17 years ago
|
Attachment #322092 -
Flags: review?(axel)
Comment 6•17 years ago
|
||
Here are some top-level comments:
I usually consider associating resource objects with datasource objects a bad idea. In my mind, resources are just unbound dots in the universe, and anybody can create any datasource to say anything about them.
I'm having a not-so-easy time in actually dissecting the API itself from the patch. When I was thinking about APIs lately, it has been more in a jqery/e4x style, but that's mostly query APIs.
http://hg.mozilla.org/users/axel_mozilla.com/rdf2/index.cgi/file/tip has that state. Nothing for write, granted.
Comment 7•17 years ago
|
||
JS objects, particularly involving inheritance, do get tricky to follow so attached is a rough idl for the module. Maybe it would be a good idea to see if you're ok with that first.
I don't necessarily have a problem with changing it so resources aren't linked to a datasource and so moving all the mutation methods onto the datasource, however the datasource would still internally need to maintain a mapping between a resource and it's associated Elements in the DOM document. Combine that with the fact that the way McCoy is going to be changing datasources is predominantly just setting properties for resources and I thought this might be the better way to go. Open to other ideas though.
Attachment #322128 -
Flags: review?(axel)
Updated•17 years ago
|
Attachment #322128 -
Attachment is patch: false
Comment 8•17 years ago
|
||
This contains a few minor tweaks to the file reading and writing code. In some cases the files weren't getting flushed and closed fast enough for the mochitests on Linux and Windows.
Attachment #322092 -
Attachment is obsolete: true
Attachment #323239 -
Flags: review?(axel)
Attachment #322092 -
Flags: review?(axel)
Comment 9•17 years ago
|
||
I saw a few
["nodeID", "about", "resource", "ID", "parseType"].indexOf(attr.localName)
which I don't see working out. If I'm right, is there a way to get some test coverage for the amount of code?
Comment 10•17 years ago
|
||
I could only find the one case which you called out and you're right, that isn't correct. It was incorrectly adding RDF:nodeID as a literal on the resource. Fixed that and added testcases for it.
Attachment #323239 -
Attachment is obsolete: true
Attachment #328521 -
Flags: review?(axel)
Attachment #323239 -
Flags: review?(axel)
Comment 11•17 years ago
|
||
Not sure if there's any value in it, did you take a look at http://www.w3.org/TR/rdf-testcases/?
Comment 12•17 years ago
|
||
(In reply to comment #11)
> Not sure if there's any value in it, did you take a look at
> http://www.w3.org/TR/rdf-testcases/?
>
You realise you've just made me write more code for you now ;)
This first patch removes the old rdf comparison function I wrote and replaces it with an ntriple based one. An rdf datasource is converted to a set of ntriples which are then compared line by line.
Unlike the previous code it has no restrictions on what rdf it can test, however it sacrifices speed for improved capabilities. Rather than try to guess which blank nodes match it just tests every possible mapping of blank nodes in one document to the other.
Given that this is just for tests I figure accuracy is better than speed.
Attachment #330066 -
Flags: review?(axel)
Comment 13•17 years ago
|
||
This is an update of the rdf datasource code from running through the rdf testsuite. The main changes are:
Proper testing for XML Names for nodeID and ID attributes.
Throw an error when encountering invalid properties or subject types in the document.
Correctly create an rdf:type property for subjects when we can't create a prefix:localname to name the subject DOM node.
Deal with many issues around relative resource URI handling.
Attachment #328521 -
Attachment is obsolete: true
Attachment #330067 -
Flags: review?(axel)
Attachment #328521 -
Flags: review?(axel)
Comment 14•17 years ago
|
||
This adds code to run the rdf testsuite tests, just the positive and negative parser tests for now. It requires a local copy of the testsuite with an altered manifest that hides tests we don't pass for now which is because of the following things that the code doesn't support:
No support for rdf:parseType (Literal or Resource)
No support for rdf:datatype
http://www.w3.org/TR/rdf-syntax-grammar/#section-Syntax-property-attributes-on-property-element
http://www.w3.org/TR/rdf-syntax-grammar/#section-Syntax-reifying
Missing rdf:RDF document element
Don't care if an rdf:ID is repeated in the same document
http://www.w3.org/TR/rdf-syntax-grammar/#section-Syntax-languages
I don't think any of these are really necessary to be implemented for now and this still leaves 97 positive parser and 40 negative parser tests all passing.
For some additional coverage I've also taken the expected result ntriples for the positive parser tests and used that to create the datasource, then test against the ntriples, then save and re-parse and test again.
Attachment #330071 -
Flags: review?(axel)
Comment 15•17 years ago
|
||
Regarding attachment 330066 [details] [diff] [review], ntriples rev 1:
Factor the ntriples/bnode split in compareNTriples into a single method, that could very well be just internal to compareNTriples.
The mapGenerator isn't really a mapGenerator, AFAICT. I'd do something like
for (var thisBlankB in permutations(blanksB)) {...}
and do some other renames to get rid of "map". It made at least me look for something different.
Triples is an array of strings, right? No idea if that'd be over-optimization, but I guess that using a hash on the subjects should speed things up a bit. But that's just a nit. Not sure how much of a perf pain this is and how often you actually run the tests ;-).
Comment 16•17 years ago
|
||
Attachment #330066 -
Flags: review?(axel) → review+
Comment 17•17 years ago
|
||
Ok, this takes the review comments, it also does the hashing by subject which is more efficient. Also took in some renames and some useful functions that were previously in later patches to make them a bit simpler.
Attachment #330066 -
Attachment is obsolete: true
Attachment #334756 -
Flags: review?(axel)
Comment 18•17 years ago
|
||
Updated for the new N-Triple structure
Attachment #330067 -
Attachment is obsolete: true
Attachment #334757 -
Flags: review?(axel)
Attachment #330067 -
Flags: review?(axel)
Comment 19•17 years ago
|
||
Updated to the new N-Triple structure
Attachment #330071 -
Attachment is obsolete: true
Attachment #334758 -
Flags: review?(axel)
Attachment #330071 -
Flags: review?(axel)
Updated•16 years ago
|
Attachment #334756 -
Flags: review?(mook)
Comment 20•16 years ago
|
||
Comment on attachment 334756 [details] [diff] [review]
ntriples rev 2
These are basic changes to the test suite to allow converting rdf into n-triples form for comparing graphs
Comment 21•16 years ago
|
||
Comment on attachment 334757 [details] [diff] [review]
patch rev 5
This implements the RDF parser and serialiser, it keeps the full DOM tree around and mutates it as assertions are made.
Attachment #334757 -
Flags: review?(mook)
Comment 22•16 years ago
|
||
Comment on attachment 334758 [details] [diff] [review]
rdf testsuite rev 2
This adds the W3 RDF test suite, or at least as much of it as the code supports.
Attachment #334758 -
Flags: review?(mook)
Comment 23•16 years ago
|
||
Just looked that review list for this account, are these reviews still requested?
Updated•16 years ago
|
Attachment #322128 -
Flags: review?(axel)
Updated•16 years ago
|
Attachment #334756 -
Flags: review?(mook)
Attachment #334756 -
Flags: review?(axel)
Updated•16 years ago
|
Attachment #334757 -
Flags: review?(mook)
Attachment #334757 -
Flags: review?(axel)
Updated•16 years ago
|
Attachment #334758 -
Flags: review?(mook)
Attachment #334758 -
Flags: review?(axel)
Comment 24•16 years ago
|
||
I think if this gets any more work it will be as a fork so reviews probably won't be too necessary now
Comment 25•15 years ago
|
||
I can no longer work on this project
Assignee: dtownsend → nobody
Status: ASSIGNED → NEW
Comment 26•7 years ago
|
||
McCoy is no longer maintained, closing.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
Updated•7 years ago
|
Product: Other Applications → Other Applications Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•