-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Command-line tools to split and/or reassemble .fwdata files #403
Conversation
AppVeyor build doesn't support net8.0, it seems. Nevertheless, I believe this is ready to be reviewed: there's no reason, IMHO, to downgrade the targeted .NET version to net6.0 or earlier since all the environments where this tool would be run are easily capable of supporting .NET 8. We'll just have to ignore the failing AppVeyor build. |
As just discussed in our team meeting:
|
Right now we've actually got 2 different cli tools, could we make them into just one exe and control the split vs merge based on the command? |
Sure. How about |
Some more options 🙃:
I feel like this functionality can basically be seen as the mother of the fwdata format, so it's entitled to such a fundamental name (i.e. just |
3a0e5a3
to
566efb8
Compare
566efb8
to
9f276f2
Compare
Will make for smaller downloads if we make standalone executables.
9f276f2
to
525996e
Compare
Interesting: when I rebased on top of develop, it included a commit that removed the AppVeyor build. But the PR checks still include AppVeyor. |
@myieye wrote:
Good suggestions; I've implemented both of them in commits c313bfe and 36603a3. |
Note: during testing we ran into an issue where the Chorus timeout on HgRunner was too short, Update: Added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me, I'd like @jasonleenaylor to have a chance to comment before we merge this in.
Why does it need its own editor config? It mostly duplicates the one at the root, I'd rather keep just one for the whole project unless there is a good reason. |
Same with the .gitattributes, why add one for the project if there is a perfectly good one at the root |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 5 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: 3 of 5 files reviewed, all discussions resolved (waiting on @rmunn)
True, it doesn't need its own .editorconfig, except for one thing. The flexbridge repo's root .editorconfig has I really don't want to change indentation to tab characters. I could give a whole presentation on why tab characters for indentation are a bad idea, but the short version is that they make indendation inflexible. Yes, tab characters in theory allow anyone to set the indent level of their code editor to their preferred style (some people like 2-space indents, some like 4, etc.) but in practice, this promise of flexibility is broken, because this kind of thing invariably happens: If anyone looks at that file with tab width set to something other than 4, then the function parameters will be misaligned from what they're supposed to be. In the extreme case, you end up with something like the following code that I found in the FW repo at one point (note that I went through some trouble to anonymize the code in this animation, because I thought I'd be using it in a presentation and I didn't want anyone to feel called out, so I replaced all the words in the code with Lorem Ipsum text of the same character length). Here is an animation of me setting the tab display width between 1 and 8 and how the table, which was clearly meant to align, never aligns properly under any tab width: I believe what happened is that someone originally wrote that code to align, then later some rename refactorings happened and the lengths of some identifiers changed, and nobody went back and re-aligned that table. But the result perfectly encapsulates why I have always disliked tab characters in indentation. So I'll trim down that .editorconfig to just the differences from the root (space indents instead of tabs). But I would prefer to keep it in there, so that this file, at least, can have correct indentation. The .gitattributes file is there for a similar reason: because the root .gitattributes as |
We only need to keep the .editorconfig settings that differ from the ones in the root (spaces instead of tabs for indent, add final newline).
Commit 418f119 gets rid of the duplicate lines from .editorconfig, making it much more obvious that it's there to override just two settings (indent style and final newline). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 3 of 5 files reviewed, all discussions resolved (waiting on @rmunn)
src/MkFwData/.editorconfig
line 1 at r2 (raw file):
Previously, jasonleenaylor (Jason Naylor) wrote…
Why does it need its own editor config? It mostly duplicates the one at the root, I'd rather keep just one for the whole project unless there is a good reason.
Replied in #403 (comment)
src/MkFwData/.gitattributes
line 1 at r2 (raw file):
Previously, jasonleenaylor (Jason Naylor) wrote…
Same with the .gitattributes, why add one for the project if there is a perfectly good one at the root
Replied in #403 (comment) — summary is that this is overriding the indent-with-non-tab
warning settings from the root, replacing them with tab-in-indent
since MkFwData uses spaces for indentation. So this is here in order to override the one from the project root.
To match the style of the rest of this repo, we'll just switch to tab indentation. That makes this nearly a whitespace-only commit, but nobody else is touching this code so it won't create merge conflicts.
@jasonleenaylor - Decided to just switch to tab indentation here so there's no need for separate .editorconfig files. Commit cda5364 has that change. If you're happy with this, I'll go ahead and merge on Monday. |
Having heard nothing, I'm going to assume this is okay. Please contact me if there are other changes you need. |
These tools were originally created in sillsdev/languageforge-lexbox#735, but are being moved to the flexbridge repository in order to simplify the process of distributing them. The intent of these tools is to enable automated test scenarios for Send/Receive as per sillsdev/LfMerge#339, and possibly other as-yet-unknown use cases.
This change is