Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6831825
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:47:01+00:00 2026-05-26T22:47:01+00:00

How do you manage generated source code files in you repositories and deployment routines

  • 0

How do you manage generated source code files in you repositories and deployment routines with Git (PHP, Python, etc)?

For example, I have a repository named “interfaces” with Thrift definitions in it. They can be converted to Python, PHP, JS, etc skeletons/stubs. Other projects in different languages, each in its own repository, want to use those stubs. How to deliver the stubs to the projects?

I see only two ways:

  1. Generate the stub files and store them in the “interfaces” repository, and this repository should be attached to the projects’ ones (as readonly submodule or any other way). But this way introduces a lot of headaches when checking out the updates to the interfaces and the stubs due to overcomplicated “git submodules” concepts.

  2. Attach pure “interfaces” repository to each project, and generate stub files as temporary git-ignorable(!) files (with “make stubs” or alike). This way, each project can have their own generation settings with their own patches applied (if needed at all). But you need to introduce some compilation commands to PHP/Python development and production environments (not just “git pull”).

What are the pros and cons of these approaches?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T22:47:01+00:00Added an answer on May 26, 2026 at 10:47 pm

    It is generally best to favour the “generation” route over the “storing generated content” route, mainly because you are not always 100% sure of the current status of said generated content: is it in sync with the sources?

    A post-receive hook can take care, upon a push, of generating the relevant content.
    See Git Hooks or Pro-Git hooks.
    On your own local instance though, (i.e. on a git pull), an alias might combine both pulling and generating said content.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I had download and compiled the source code from GIT, and also successfully runs
I have an open source python library sitting in my virtualenv site-packages. And I
I have the following Sphinx code in a .rst file in my doc/source directory:
I manage a rather large application (50k+ lines of code) by myself, and it
I have been given an SWF to edit a link in the AS code.
I have been writing command-line Python scripts for a while, but recently I felt
I have a dynamically generated table in my page, which was generated by a
I have written a C DLL and some C# code to test including this
I'm using vim's taglist plugin to navigate source files in my project, but I've
I have a code base that can be customized for different customers. This is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.