tag:blogger.com,1999:blog-5947958124349996271.post8008597681449050220..comments2024-03-19T04:14:58.895-04:00Comments on Quetzalcoatal: DXR thinking aloudJoshua Cranmerhttp://www.blogger.com/profile/02760318962075959780noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-5947958124349996271.post-48475521409211000902011-06-10T06:41:52.499-04:002011-06-10T06:41:52.499-04:00Static analysis for .properties references would b...Static analysis for .properties references would be awesome.<br /><br />We have an existing python library for parsing DTDs and properties with http://hg.mozilla.org/l10n/silme/, too.<br /><br />Also, feel free to CC me on bugs.Pikehttps://www.blogger.com/profile/16345930345891233736noreply@blogger.comtag:blogger.com,1999:blog-5947958124349996271.post-87915214696640629932011-06-06T15:42:16.480-04:002011-06-06T15:42:16.480-04:00I would also say "look at ccache", excep...I would also say "look at ccache", except I hate the bogus gcc wrapper mode of using it.<br /><br />Look at configure.in's --with-ccache option. It just sets CC="ccache $CC" and likewise for CXX.<br /><br />So you have a wrapper script named "dxr-build" or whatever that simply sets your env vars and execs the rest of its arguments: <br /><br /> #!/bin/sh<br /> export DXR_DOSTUFF=1<br /> exec "$@"<br /><br />or something. Although if you're really just setting environment variables, then that's too complex. Just make a --with-dxr that does<br /><br /> CC="env DXR_DOSTUFF=1 $CC"<br /> CXX=...Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5947958124349996271.post-71431074075185888422011-06-06T12:39:01.748-04:002011-06-06T12:39:01.748-04:00@Taras: I don't know if I made this clear, but...@Taras: I don't know if I made this clear, but the literal output of the clang indexer is a (or several) giant CSV file(s) which gets plopped into the postprocessor to be turned into the SQL to insert into the database. Once I get things basically working in ship-shape form, I'll spend some time profiling everything to figure out where we're burning the CPU time.<br /><br />@Mook: I don't trust gcc to be the first compiler people look for. Although I hadn't thought about mucking with $PATH; so far, it's just $CC and $CXX I've mucked with. Still has the same issue with environment paths.<br /><br />@jmdesp: Insofar as dxr can be language-agnostic, I think cross-language bindings is important. However, I suspect that it's hard to generalize the finding of the bindings...<br /><br />@Pike: Neat. A related idea would be to try to find usages of *.property strings as well via some static analysis.Joshua Cranmerhttps://www.blogger.com/profile/02760318962075959780noreply@blogger.comtag:blogger.com,1999:blog-5947958124349996271.post-17716310480732433292011-06-06T03:34:27.407-04:002011-06-06T03:34:27.407-04:00One thing that has come up out of the l10n communi...One thing that has come up out of the l10n community tons of times is being able to find strings, and how they're used.<br /><br />Finding the source of a localized string just in en-US would be really helpful, spanning all localizations even more. And cross referencing entity references and their definition inside DTD files would be great. Same for properties files, though I'd have a harder time to think something up to find the source.<br /><br />I'd be happy to help with the analysis step for our DTD and propertiers files, if you see a point in that.Pikehttps://www.blogger.com/profile/16345930345891233736noreply@blogger.comtag:blogger.com,1999:blog-5947958124349996271.post-17935778495838149242011-06-05T15:08:52.565-04:002011-06-05T15:08:52.565-04:00The strength of dxr is to be able to do far more t...The strength of dxr is to be able to do far more than just syntax based analysis, if you limit yourself to that, there's several other tools that are able to do the same. <br />Also understanding bindings between separate languages and being able to go across them would be a big killer feature. I think for the mozilla code database it'd be hugely useful to have that for xpcom based bindings, but based on an extendable base that can easily be modified to work also for other kinds of bindings.jmdesphttps://www.blogger.com/profile/13110057262074119810noreply@blogger.comtag:blogger.com,1999:blog-5947958124349996271.post-17172582550532251592011-06-05T00:54:53.692-04:002011-06-05T00:54:53.692-04:00For the building part, would something like what c...For the building part, would something like what ccache does work? Make a wrapper to gcc that takes the same arguments, and call it "gcc" and stick it earlier in $PATH.Mooknoreply@blogger.comtag:blogger.com,1999:blog-5947958124349996271.post-60333696068970139262011-06-04T23:36:51.069-04:002011-06-04T23:36:51.069-04:00Yeah, first #1 is good. We can also get rid of sql...Yeah, first #1 is good. We can also get rid of sql, we'll have to eventually if we want to make this sucker perform :)<br /><br />I doubt dxr needs more than a fast key-value store. the db is only generated once and is readonly after that.<br /><br />I think making a generic frontend is a hopeless task. We should focus on specific languages and then once someone else wants to add a language we can address that problem when we come to it. Overdesign is worse than no design <br /><br />TarasAnonymousnoreply@blogger.com