Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-1882

Use single include

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Incomplete
    • None
    • 0.9.1
    • C glib - Library
    • None
    • Patch Available

    Description

      Currently, when using thrift_c_glib you have to include several headers. It would be nice if you could just include a single header, which would then include the other headers for you. Most projects I'm aware of, particularly those based on glib and gobject like thrift_c_glib is, use this method exclusively. It offers more flexibility by allowing the library to occasionally reorganize its headers and is much easier for consumers to deal with. Note this is particularly important for Vala bindings which are not distributed with the library they bind (https://live.gnome.org/Vala/UpstreamGuide#C_Headers).

      I've created a patch which will have thrift/c_glib/thrift.h include all other necessary headers, and issue a warning if headers other than thrift/c_glib/thrift.h are included. This touches the compiler as well, but I think the library component is a more appropriate place for the bug.

      I don't see anywhere to actually attach a patch (maybe it's coming after I click "Create"), so if nothing else you can find the patch here: https://github.com/nemequ/thrift/commit/a24b256c62ea65890f19f4a93f582ee6c35da53c

      Attachments

        Activity

          People

            jfarrell Jake Farrell
            nemequ Evan Nemerson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: