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

Idea: generate .fwdata file from lexbox? #631

Open
rmunn opened this issue Mar 4, 2024 · 7 comments · May be fixed by sillsdev/flexbridge#403
Open

Idea: generate .fwdata file from lexbox? #631

rmunn opened this issue Mar 4, 2024 · 7 comments · May be fixed by sillsdev/flexbridge#403
Assignees
Labels
Needs design User request Changes that real users have requested
Milestone

Comments

@rmunn
Copy link
Contributor

rmunn commented Mar 4, 2024

As an admin-only tool, if there's a Send/Receive problem with a project, we might sometimes want to download an .fwdata file from the repo. The actual logic for how the .fwdata file gets put together from pieces is extremely simple and wouldn't be too hard to do. Question is, how useful would it be? I have a feeling that it would turn out to be immensely useful in many ways, but we'll see.

@myieye myieye added this to the vNext milestone Mar 27, 2024
@rmunn
Copy link
Contributor Author

rmunn commented Apr 12, 2024

A tech support user wrote to us saying:

As I support teams using FLEx I often have the need to re-download their FLEx project. I usually don't want to do a send/receive in case I may have inadvertently changed something. Right now, it's kind of a slow process that I wonder if you could speed up. First, I have to close the pertinent project and open a different project, then I have to delete the pertinent project, then I have to do Get project from colleague and fill out all the information. I would love a way to just select Replace this Project with What's on the Server and it would do all the stuff it needs to.

If we made this feature generally available (with good UI), not just to admins, that might go a long way towards responding to this user's request.

@hahn-kev
Copy link
Collaborator

True, however that users problem would better be solved with #695 which would let him pull changes without pushing, which is what he wants to do right now.

@hahn-kev hahn-kev removed this from the vNext milestone Apr 12, 2024
@megahirt
Copy link
Contributor

megahirt commented Apr 13, 2024 via email

@rmunn
Copy link
Contributor Author

rmunn commented Apr 18, 2024

I took a look at the FLExBridge code. The static PutHumptyTogetherAgain method that reassembles a .fwdata file from its component parts is an internal method, however FLExBridge exposes its internals to LfMergeBridge, which we're already using. All we would need to change to make this workable would be to add the following static method in LfMergeBridge:

public static void PutHumptyTogetherAgain(IProgress progress, bool writeVerbose, string mainFilePathname)
{
    FLExProjectUnifier.PutHumptyTogetherAgain(progress, writeVerbose, mainFilePathname);
}

That would allow us to use the PutHumptyTogetherAgain method from a console tool that uses the LfMergeBridge library, without touching the class permissions of FLExProjectUnifier. We would then just need to release a new version of the LfMergeBridge NuGet package and we'd be able to write a command-line tool that does what we need, with no risk to FLEx or WeSay since we're not touching the interfaces they use at all.

@myieye
Copy link
Contributor

myieye commented May 13, 2024

As discussed the CLI will be part of the FLExBridge repo. It should be packaged/available in a FLExBridge installation.

@rmunn
Copy link
Contributor Author

rmunn commented Jun 26, 2024

As discussed the CLI will be part of the FLExBridge repo. It should be packaged/available in a FLExBridge installation.

PR is now over in FLExBridge repo at sillsdev/flexbridge#403. The GHA workflow doesn't build installers for PRs currently, so I can't easily verify that the binaries are being included in the FLExBridge installer package. I suspect, for now, that they aren't, and that I'll need to modify the .wix files to include them, but I don't expect to be able to test that until that PR is reviewed and merged. In the meantime, you can test the tools by running dotnet run in the project directory and passing command-line options after a --. E.g. if you're in the MkFwData directory, dotnet run --help will print help for the dotnet run command, but dotnet run -- --help will print help for the MkFwData tool.

@hahn-kev hahn-kev added this to the vNext milestone Aug 7, 2024
@hahn-kev
Copy link
Collaborator

Per meeting discussion the tool will go into the FlexBridge repo and we will have a workflow to build the exe for us to download, if in the future Jason wants to include it with the FW installer then it's already in place to do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs design User request Changes that real users have requested
Projects
None yet
4 participants