byronwall / bUTL

Excel add-in with helpers for charting, formatting, and general pain points
http://byroni.us/bUTL
MIT License
16 stars 3 forks source link

Modify code export to skip frx files #18

Open byronwall opened 9 years ago

byronwall commented 9 years ago

This is the same issue that is faced over at https://github.com/hilkoc/vbaDeveloper/issues/5.

Probably want a prompt that will not export these files unless a form was actually changed. Seems reasonable to just prompt for this now.

byronwall commented 9 years ago

This is still a problem with the current build script. Not sure the best way to get around it. Right now I am just unchecking files that I know were not changed while editing. Ideally, the build script will be able to take care of this. Maybe it can compare the new .vba files against the old ones and overwrite the "new" ones which don't actually have changes.

RaymondWise commented 9 years ago

Did the new export script fix this?

byronwall commented 9 years ago

Not yet. Trying to decide how "automated" this skipping should be. For now, I have just been unchecking these files when they show up in the commit if I know there was no change. That largely defeats the purpose of a version control system though.

The problem seems to be that the frx binary file has some change in it even when there is no corresponding change in the vba/plain text output. I think it's possible to keep a copy of the current/existing vba files and compare them to the new versions. If the plain text of the new and current vba file matches, then it can discard the corresponding frx file and bring back the previous version. That should all be doable by renaming the current /code/ directory to /code-old/ or such, outputting the new files into /code/, checking the text of the corresponding vba file for each frx file, moving old frx files back if no change, and then deleting the /code-old/ folder.

That sounds easy enough. I assume it would work. I will take a stab at it shortly.

byronwall commented 9 years ago

On further thought, this is probably not a good approach. That frx file contains all of the information for UserForm properties and other things which could presumably change without the vba file changing. Might stick to unchecking things for now.

RaymondWise commented 9 years ago

I agree, after having done some commenting in the .frx forms, they needed to be synced and excluding them wouldn't have worked. Manually checking and unchecking would work - but also it might be useful to put an option in the script to exclude .frx - ask the user. If they didn't make changes, then exclude them from the export.

byronwall commented 9 years ago

I'll add an option to the build script which makes this prompt. It will ask

I think these prompts will come from Excel and not Powershell just to make it easier.