Git Product home page Git Product logo

sillsdev / flexbridge Goto Github PK

View Code? Open in Web Editor NEW
5.0 9.0 19.0 54.49 MB

FLEx Bridge is an application that allows multiple FieldWorks users to collaborate remotely (i.e., not necessarily connected by a local network).

License: MIT License

HTML 2.49% Shell 0.25% C# 96.78% CSS 0.03% Makefile 0.34% Batchfile 0.11%
chorus fieldworks flex-bridge palaso send-receive linux windows hacktoberfest

flexbridge's Introduction

FLEx Bridge

FLEx Bridge is an add-on to FieldWorks (https://software.sil.org/fieldworks/; https://github.com/sillsdev/FwDocumentation/wiki) that supports using Chorus (https://github.com/sillsdev/chorus) to allow multiple users to share data.

Architecture

The "big idea" for the bridge system is that clients do not have to know how talk to Chorus directly to do Send/Receive(S/R), or even know that Chorus is involved. The architecture allows for any number of "bridges" between clients and Chorus, with a new bridge being needed for each major kind of xml data (e.g., LIFT or FLEx's fwdata). Each bridge needs to define Handlers for the xml file extensions it will have in its data. Chorus uses those handlers in its work. Each bridge also needs to define Actions, which are the kinds of things it wants to do for S/R.

Language Forge (LF) uses LfMergeBridge to S/R the full FLEx data set (LCModel, fwdata file). LF needs a Windows.Forms-free environment since it runs on a server.

FLEx uses FLEx Bridge to S/R its own data set and for LIFT (also compatible with WeSay). WeSay talks directly to Chorus and does not use FLEx Bridge.

The TriboroughBridge project (named after the RFK Triborough Bridge complex connecting three boroughs in New York) contains pieces that are applicable to both FLEx Bridge (Full LCModel) and LiftBridge (LIFT model, also compatible with WeSay).

See diagram: FLEx Bridge Projects Relationships

Development

Setup

FLEx Bridge depends on several assemblies from Chorus and Palaso. Those are installed from nuget.org.

Connecting FieldWorks to FLEx Bridge

  • On Windows, add the following keys to your registry (32-bit OS: omit 'Wow6432Node'):

    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SIL\Flex Bridge\9]
        "InstallationDir"="C:\Dev\flexbridge\output\Debug\net461"
    
  • On Linux, export FLEXBRIDGEDIR=${HOME}/fwrepo/flexbridge/output/Debug/net461

Build

You should be able to build solution FLExBridge.sln from Visual Studio 2022 Community Edition or JetBrains Rider.

You can also build and run tests on both Windows and Linux from the command line by running:

cd build
msbuild /t:Test FLExBridge.proj

Building client projects against locally-built artifacts

  • Set an enviroment variable LOCAL_NUGET_REPO with the path to a folder on your computer (or local network) to publish locally-built packages
  • See these instructions to enable local package sources
  • build /t:pack will pack nuget packages and publish them to LOCAL_NUGET_REPO

Further instructions at https://github.com/sillsdev/libpalaso/wiki/Developing-with-locally-modified-nuget-packages

Updating Release Notes for a new version

FLEx Bridge is following the gitflow model for branching

When releasing FLEx Bridge be sure to do the following:

  1. Update the version and changelogs / release notes by doing the following.

    • Generate a new Product ID GUID in build/WixPatchableInstaller.targets

    • Edit CHANGELOG.md by editing or adding to the items in the ## [Unreleased] section. This will be published as release notes for users.

    • Run the following build task to fill in debian/changelog and the release notes html from CHANGELOG.md. Replace CHANNEL in the below with Alpha, Beta, or Stable. For a pre-release, pass /p:Release=false as an additional property. Push the results.

      Windows:

      cd build
      build.bat /t:PreparePublishingArtifacts /p:UploadFolder=CHANNEL

      Linux:

      cd build && msbuild FLExBridge.proj /t:PreparePublishingArtifacts /p:UploadFolder=CHANNEL
    • (Ignore this step for now; FLEx Bridge patches cannot be bundled in FLEx patches) Windows: Tag and Pin the FLEx Bridge Installer build on TeamCity, then update the FLEx Bridge Patcher build to depend on that tag.

    • Tag the commit after the PR is merged e.g. git tag v3.2.1 and push the tag to the repository.

  2. Build

    • The Windows version is released through two jobs on TeamCity: "Installer" and "Patcher". The first three version numbers come from the version file; the fourth-place version number is always 1 for "Installer" and comes from the build counter for "Patcher". If you need to make a fix before publishing a patch, you can avoid incrementing the version number by setting the build counter back before rerunning the Patcher job.

    • Make a Linux package for release by doing the following:

      • Go to the Jenkins job for this branch of flexbridge.
      • Click Build with Parameters.
      • Change Suite to "main" (or maybe "updates" for a hotfix).
      • Unselect AppendNightlyToVersion.
      • Optionally set Committish to an older commit, such as where the changelog entry was updated.
      • Click Build.

flexbridge's People

Contributors

andrew-polk avatar ann-bush avatar cambell-prince avatar chrisvire avatar ddaspit avatar ericpyle avatar ermshiperete avatar gmartin7 avatar gtryus avatar hatton avatar irahopkinson avatar jamesprabu avatar jasonleenaylor avatar johnthomson avatar josephmyers avatar mark-sil avatar marksvc avatar mccarthyrb avatar megahirt avatar neilmayhew avatar papeh avatar raymondluong3 avatar regnrand avatar rmunn avatar stephenmcconnel avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flexbridge's Issues

Cannot build with mono 5

Building FW+FB in flatpak will be easier if I can build both with the same mono version. I need to use mono 5 to build FW. Building FB with mono5-sil (5.16.0.1) results in an error:

flexbridge/build$ ../run-in-environ msbuild FLExBridge.proj /p:Configuration=Debug
Microsoft (R) Build Engine version 15.1.8.0 ( Wed Sep 5 19:27:37 UTC 2018) for Mono
...
RunGitVersion:
mono "/home/vagrant/fwrepo/flexbridge/packages/GitVersion.MsBuild/tools/net48/gitversion.exe" "/home/vagrant/fwrepo/flexbridge/build" -output file -outputfile gitversion.json
...
ERROR [06/07/21 9:19:07:53] An unexpected error occurred:
System.TypeInitializationException: The type initializer for 'System.Text.Json.JsonSerializerOptions' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Text.Json.Serialization.Converters.IEnumerableConverterFactory' threw an exception. ---> System.TypeLoadException: Could not find method '.ctor' due to a type load error: Type System.Text.Json.Serialization.Converters.IDictionaryConverter1[TCollection] has invalid vtable method slot 32 with method none assembly:/home/vagrant/fwrepo/flexbridge/packages/GitVersion.MsBuild/tools/net48/System.Text.Json.dll type:IDictionaryConverter1 member:(null)
--- End of inner exception stack trace ---
at System.Text.Json.JsonSerializerOptions..cctor () [0x0001f] in <74da783969ef4b53bcddcbb5f10fc069>:0
--- End of inner exception stack trace ---
at GitVersion.OutputVariables.VersionVariables.JsonSerializerOptions () [0x00000] in :0

This is not a problem if I use msbuild FLExBridge.proj /p:Configuration=Debug with mono 6.

OS: Ubuntu 20.04
Branch: feature/nuget

Maybe there is a work-around where I can skip using gitversion?

Update About page

The about page is quite out of date, it should be updated to reflect the current state of support.

Here's the current version
image

how do we want to update this?

Re-create lfmerge branch for TeamCity build

The Jenkins build of LfMerge depends on a TeamCity build named FLExBridgeLfmergeLinux64Continuous, which is supposed to build the lfmerge branch. The lfmerge branch was merged into develop in commit 7e06978 and deleted a little while later. But this has been causing the Jenkins build of LfMerge to fail. So I'm going to re-create the lfmerge branch based on commit 7e06978, or possibly commit 67d12ee a short time later which appears to contain several build fixes. This will allow the Jenkins build of LfMerge to work again.

Actually, I simplified the previous paragraph; there are really two Jenkins builds of LfMerge, one that builds lfmerge-7000072 from the master branch, and one that builds lfmerge-70000{68,69,70} from the fieldworks8-master branch. The master branch build has been working fine; it's only the fieldworks8-master branch that's been failing. But now I need to merge some code into LfMerge's fieldworks8-master branch, which means I need to get its Jenkins build working again. Re-creating the lfmerge branch here is the simplest way to do that.

[feature/nuget] Adjust changelogs

From code review comment in #251:

We have been keeping a changelog for flexbridge for many years in debian/changelog and we have build scripts in this repository that have been used to keep this as well as some public documentation up to date.

The build scripts etc should be changed to take the changes from CHANGELOG.md and update debian/changelog and the documentation etc.

Error publishing .snupkg files - The required element 'authors' is missing

#407 got the AppVeyor build running again, but now there's an error:

Error publishing NuGet package artifact output/SIL.ChorusPlugin.LibFLExBridge.4.2.0-beta0025.snupkg: NuGet package cannot be read: The required element 'authors' is missing from the manifest.

And the same error message for all other symbol packages: SIL.ChorusPlugin.LibTriboroughBridge, SIL.ChorusPlugin.FLEx, etc.

This may become moot if #405 is approved and nuget package building moves to GitHub Actions, but in the meantime, it's worth looking into this error.

Move NuGet packaging build to GitHub Actions

The build that creates the NuGet package(s) for FlexBridge is currently running on TeamCity. It's been failing to build since the commit that updated SIL.Chorus.Mercurial to 6.5.1. The reason, at least for the Linux64 build, is because the TeamCity runner is still on Ubuntu Xenial, which has Python 3.5. Mercurial, starting with release 6.2, supports Python 3.6 (or above) only.

We could fix this by creating a new TeamCity Linux build agent, but we're trying to move away from TeamCity. The better solution would be to move the NuGet packaging build to GitHub Actions.

Master branch building from FlexBridgeBeta depenendencies

FLEx Bridge-master-Win32-Continuous is currently failing at unit test on TeamCity.

The test runs fine locally on my developer machine, where dependencies are gathered via UpdateDependencies.bat.

When I reviewed Download.targets which TC uses, it seems the dependencies are being pulled from the FlexBridgeBeta Continuous builds.

The reason the unit test is failing now is because we recently added STRONG_NAME on the master branch of libpalaso, and the failing unit tests are flagging the error:
"Could not load file or assembly 'Palaso.TestUtilities, Version=2.5.120.0, Culture=neutral, PublicKeyToken=cab3c8c5232dfcf2' or one of its dependencies"

Should Download.targets be deprecated and let TC manage the dependencies?

Update AppVeyor Visual Studio version

appveyor.yml currently builds with image: Visual Studio 2019. We should update that to 2022 so that AppVeyor will be able to build code that targets .NET 8.

Here's an AppVeyor build that targets .NET 8 and built successfully from a PR branch. The only change needed was updating the image to 2022 instead of 2019.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.