Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify code export to skip frx files #18

Open
byronwall opened this issue Jul 23, 2015 · 6 comments
Open

Modify code export to skip frx files #18

byronwall opened this issue Jul 23, 2015 · 6 comments

Comments

@byronwall
Copy link
Owner

This is the same issue that is faced over at hilkoc/vbaDeveloper#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
Copy link
Owner Author

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
Copy link
Contributor

Did the new export script fix this?

@byronwall
Copy link
Owner Author

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
Copy link
Owner Author

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
Copy link
Contributor

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
Copy link
Owner Author

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

  • "Do you want to ignore exporting all form files? Yes/No"
  • If yes, then it will proceed and skip them all.
  • If no, it will ask for each individual file, "Do you want to export Form WhatsItsName?" and export accordingly.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants