Thrift
  1. Thrift
  2. THRIFT-358

Change how external thrift files' generated code is required

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.1
    • Component/s: Ruby - Compiler
    • Labels:
      None
    • Patch Info:
      Patch Available

      Description

      Currently, Ruby generated structs assume that any external Thrift files' generated code can be found in exactly the same directory, which is often not the case. This leads to issues when you have a bunch of different thrift files and generated code living in different places.

      The best solution seems to be to change the generator to omit the path leading up to the included thrift file's name, and just assuming that the developer will put the external generated code into the Ruby load path.

      1. thrift-358.patch
        0.6 kB
        Bryan Duxbury

        Activity

        Hide
        Bryan Duxbury added a comment -

        Committed.

        Show
        Bryan Duxbury added a comment - Committed.
        Hide
        Kevin Clark added a comment -

        Simple enough. +1 to the patch

        Show
        Kevin Clark added a comment - Simple enough. +1 to the patch
        Hide
        Bryan Duxbury added a comment -

        This should do it. There isn't any test for this in the current codebase, but I verified that it works in my projects.

        Show
        Bryan Duxbury added a comment - This should do it. There isn't any test for this in the current codebase, but I verified that it works in my projects.
        Hide
        Kevin Clark added a comment -

        +1

        Hardcoding the path feels wrong. This is better.

        Show
        Kevin Clark added a comment - +1 Hardcoding the path feels wrong. This is better.

          People

          • Assignee:
            Bryan Duxbury
            Reporter:
            Bryan Duxbury
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development