Open daFreeMan opened 7 years ago
Be aware that there are elements contained that are not necessarily desirable for SC. This is off the top of my mind, so don't take it as gospel; some research needed:
1) Version
which can limit whether it will be imported or not
2) Checksum
which seems like a good thing but IIRC, may be changed without changing anything else and possibly block import
3) NameMap
this is from the ~AutoCorrupt~ AutoCorrect feature and is not really needed in SC.
I'm sure there's few more but the point is that it might be desirable to be able to sanitize some of the elements that don't fit SC paradigm terribly well.
What if we treat the Access format as an intermediary format - but instead of stripping out or tolerating the undesirable base64 encoded binary blobs, we instead convert that format to a more source-control-friendly format, where the blobs are saved as binary files, and they're referenced by an RD-defined text-only format?
If the blob is a picture, the picture could be saved as a BMP/EMF/GIF/etc, and source control tools like GitHub could show the differences.
We could use a common text-only format (along with referenced binary objects) for Access forms/reports, but also for deserialized UserForms. It would require that RD be installed to do the conversion/serialization/deserialization between the VBE and SC.
@ThunderFrame would we not want that separation of resources for .frx as well then?
@retailcoder yeah, that's why I'm suggesting a common format. If a userform has a background image, then we should deserialize the FRX into text, and refer to the BMP/EMF/GIG as a resource.
FWIW - if they are embedding image in an Access object, that's an inspection for not using the shared gallery.
That said I like the image of storing the BLOBs separately to support better diff. That would help in the cases where we can't even diff (e.g. the PtrDev stuff) without necessarily polluting the commits just because they have different printers.
Since we're not doing SC anymore, should this be closed as "N/A"?
@daFreeMan We're not doing integrated SC, but that doesn't mean we don't want to implement features that help our users to do non-integrated SC
@Vogel612 I just thought about to create that issue,. as I tried the export and noticed there is only vba code. Can you estimate difficullty and needed effort?
If we implement this we create an option for Access to replace the whole export with Application.SaveAsText?
Sorry, that's definitely not my area of expertise. Pinging @bclothier for opinions.
I suppose it can be here to the IHostApplication
interface. We do have some special cases for Access as you can see here. But keep in mind that this has to be abstracted away for all hosts. Example can be seen here. This is to ensure we do not pollute codebase with special edge cases over all the places, even if its needed by only one. Obviously that costs something.
That said, a PR on this would be welcome as long it conforms for all hosts.
For Access,
Application.SaveToText
andApplication.LoadFromText
should be added to theSource Control
code to export and import all user forms.