Can I recompile the .PAS files used by the Delphi IDE?

后端 未结 7 851
既然无缘
既然无缘 2021-01-13 11:27

I am familiar with Jeff Atwood\'s article about how errors are always the programmer\'s fault, but I believe I have really and truly found a bug in a Delphi .pas file.

7条回答
  •  情话喂你
    2021-01-13 12:10

    See previous answers for how to create the situation where you can recompile modified VCL source. I would however add that you seriously consider managing your changes in your change control system, using the "Vendor Branch" SCM pattern.

    In simple terms (using SVN as a reference):

    • Create a "vendor source" copy of the original vendor supplied files. This is your "pristine" reference copy.

    • Create a branch representing that pristine copy (e.g. "2009" for the Delphi 2009 version of the VCL)

    • create a further branch into a separate "vendor library" folder. THIS is the copy of the library that you should reference in your projects

    • any modifications to the vendor source are made in the "vendor library" branch.

    • when the vendor provides a new version of the library you check the new version in to the "vendor source" project and create a new branch for the new version.

    you can then easily diff the vendor revisions. But more importantly (with SubVersion, and possibly othe SCM systems) you should also be able to simply merge (i.e. automatically) the new vendor source with your "vendor library" branch to easily incorporate vendor changes with your own modifications.

    This is all described far better than I just did in the excellent O'Reilly book: "Version Control with SubVersion"

    NOTE however that the "loaddirs" utility mentioned in that book is no longer supported due to copyright issues, so updating "vendor drops" is currently a manual exercise, but this occurs only infrequently and is not a major burden.

    We are using this pattern ourselves, although in the case of the VCL we do not maintain a complete copy of the entire VCL source tree in our "vendor source" or "vendor library", but instead only track changed and dependent units. For other libraries managed under a vendor branch we typically do maintain complete copies but decided this wasn't necessary for the VCL.

    We've only just implemented this pattern however, so we may yet decide that we need to take a more comprehensive approach with the VCL too.

    ymmv

提交回复
热议问题