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

Update Getting Started behavior for Subversion/SVN #849

Closed
JoelProminic opened this issue Jun 11, 2021 · 24 comments
Closed

Update Getting Started behavior for Subversion/SVN #849

JoelProminic opened this issue Jun 11, 2021 · 24 comments
Assignees
Labels
Milestone

Comments

@JoelProminic
Copy link
Contributor

@JustinProminic reported an issue with enabling SVN and Git Integration on macOS Catalina or higher:

  1. If you have set a path for the SVN binary already, clear it in the Moonshine settings
  2. Open Getting Started.
  3. Find the Subversion Integration and Git Integration settings. Note that both show a warning now
  4. Click the gear icon next to Subversion Integration
  5. Accept the prompt
  6. The warning icons clear
  7. Close and reopen Getting Started
  8. Find the Subversion Integration and Git Integration settings. BUG: Both show a warning again

image

Part of the problem is that SVN is no longer associated with XCode since macOS Catalina. So, SVN now needs to be installed with Brew.
9. Install SVN with brew if you haven't already
10. Open Moonshine > Settings > Subversion
11. Note that this is using the XCode path now.
12. Click "Change" and choose "/usr/bin/svn". NOTE: this is currently broken because of #839
13. After saving, the warnings should be cleared in Getting Started

We need to update this so that the permissions check requirement is for Git only. We should have a separate check for SVN that depends on the SVN Binary only, similar to how the other SDKs work.

@rat-moonshine
Copy link
Collaborator

Understood. We need to de-couple Git and SVN check separately.

@JoelProminic
Copy link
Contributor Author

Now that #839 is fixed, I can now set a path for the Subversion binary. With a HomeBrew installation, the path is:

/usr/local/Cellar/subversion/1.14.0_6/bin/svn

However, this is still not working properly for me:

  1. Set the Subversion binary. BUG: The error message for the path does not clear until I save and reopen the Settings
  2. Open and Select an SVN project.
  3. BUG: the menu still shows Subversion > Grant Permission
  4. BUG: the other SVN features are missing in the Subversion menu
  5. Click Subversion > Grant Permission. This opens the Manage Repositories interface
  6. Select/Add an entry for an SVN project
  7. Click Checkout. BUG: nothing happens
  8. Close the Manage Repositories window. BUG: The "Grant Permission" panel was opened behind this window.
  9. Close the prompt
  10. Check on Settings > Subversion > SVN Binary. BUG: This was updated to /usr/local/Cellar/subversion/1.14.0_6/bin/usr/bin/svn
  11. Restart Moonshine
  12. Check on Settings > Subversion > SVN Binary. This path is still correct
  13. Open Subversion > Manage Repositories
  14. Try to checkout an SVN project. BUG: Nothing happens
  15. Close the Manage Repositories panel. BUG: the Grant Permission prompt is open behind it again
  16. Check on Settings > Subversion > SVN Binary. BUG: This was updated to /usr/local/Cellar/subversion/1.14.0_6/bin/usr/bin/svn
  17. BUG: Note that you see Git > Grant Permission in the menu now, even if you granted permission before.

@JoelProminic
Copy link
Contributor Author

When I tried to use Git in Moonshine during the meeting today, I found that it is also broken now. It keeps resetting to be based on the SVN path: /usr/local/Cellar/subversion/1.14.0_6/bin/usr/bin/git

I tried changing this back to the GitHub path and restarting Moonshine, but it keeps resetting back to the above path each time I try to clone a project.

@rat-moonshine
Copy link
Collaborator

rat-moonshine commented Jun 24, 2021

I should have asked you the earlier day only, if you still has the trouble please provide me the folder /Library/Application Support/com.moonshine-ide as a zip. Hopefully the path is stored somewhere in cookies where Moonshine retrieves the information from.

@rat-moonshine
Copy link
Collaborator

I'm starts de-coupling SVN and Git path from being one to separate.

@rat-moonshine
Copy link
Collaborator

@JoelProminic Since we can't rely on Xcode anymore for Subversion, what path we should detect for a possible existence on macOS, or foremost is we suggest to download any Subversion software that provides command-line (as slik-svn on Windows) which software it could be?

rat-moonshine added a commit to Moonshine-IDE/Moonshine-SDK-Installer that referenced this issue Jun 25, 2021
- Founding Git on macOS do not makes SVN is available anymore
(Moonshine-IDE/Moonshine-IDE#849, #61)
@rat-moonshine
Copy link
Collaborator

rat-moonshine commented Jun 25, 2021

Part of the updates:

  • Detection and setup logic in Moonshine SDK Installer
  • Removal of 'Grant Permission' for SVN
  • Manage Repositories updates

@rat-moonshine
Copy link
Collaborator

rat-moonshine commented Jun 25, 2021

@JoelProminic I did a couple of changes in "Manage Repositories" following the #849 (comment) changes, please let me know if they sounds logical or we want to improve the procedures by some other way.

Case: Subversion Unavailable

Create a new SVN entry
Moonshine will prompt on the unavailability of Subversion, but user can continue to add an entry:
image

Browse All
Here's a list of repositories including Git and SVN to demonstrate, when Subversion is unavailable
image

If user clicks on the "Browse All" button, SVN entry shall not be added into the tree-listing, because unfolding/browse Subversion entry requires Subversion executable:
image

SVN Entry Checkout
It shall throw a console error, and open the Moonshine Settings so user can add a Subversion path:
image

Case: Git Unavailable

Git Entry Clone
Prompt the user of Git unavailability and restrict to continue:
image

With all these changes I guess we probably covered all the test-cases in "Manage Repositories" when Git or Subversion is unavailable. Let me know if I missed any or we need some course changes.

@JoelProminic
Copy link
Contributor Author

I have a separate issue for the installation and configuration of SVN on macOS: Moonshine-IDE/Moonshine-SDK-Installer#31

My suggestion is to install SVN through Homebrew, but this could be a problem for MSDKI.

rat-moonshine added a commit to Moonshine-IDE/Moonshine-SDK-Installer that referenced this issue Jun 28, 2021
…vn path tries to validate by the validation-path from MSDKI configuration (Moonshine-IDE/Moonshine-IDE#849, #61)
@rat-moonshine
Copy link
Collaborator

@JoelProminic I pushed a fix on Git and SVN path issues, specially where SVN paths was showing invalid due to an additional path-validation-test where Moonshine was trying to validate the given path with specific file-existence check.

Tested on macOS in following scenarios:

Platform SDK Path Value Valid
macOS Git /Applications/Xcode/contents/Developer/usr/bin/git Yes
macOS Git /Applications/Xcode/contents/Developer/usr/bin/someOtherExecutable No
macOS Git /Documents/SomeOtherApp/Otherapp.app Yes
macOS Git /Applications/Xcode/contents/Developer Yes (if usr/bin/git exists)
macOS SVN /Applications/Xcode/contents/Developer Yes (if usr/bin/svn exists)
macOS SVN /Applications/Xcode/contents/Developer/usr/bin/svn Yes
macOS SVN /Applications/Xcode/contents/Developer/usr/bin/someOtherExecutable No
macOS SVN /Documents/SomeOtherApp/Otherapp.app Yes

If the changes still not resolve your problem you want to check /Users/$user/Library/Application Support/com.moonshine-ide/Local Store/settings/SVNPlugin.xml saved path, after setting the SVN path.

@JoelProminic
Copy link
Contributor Author

I tried this:

  1. Open Moonshine
  2. Clear the paths for SVN and Git.
  3. Confirm that SVNPlugin.xml and GitHubPlugin.xml are updated
  4. NOTE: I still see the SVN Path defined in VersionControlPlugin.xml
  5. Restart Moonshine
  6. Confirm that SVNPlugin.xml and GitHubPlugin.xml are not updated
  7. Git > Grant Permission. BUG: both SVNPlugin.xml and GitHubPlugin.xml update to use the subversion path. This matches the URL in VersionControlPlugin.xml

VersionControlPlugin.xml looks like this

<settings>
  
  <properties>
    <xcodePath>/usr/local/Cellar/subversion/1.14.0_6/bin</xcodePath>
  </properties>
  
</settings>

If I manually set the Git and SVN paths, then they are properly preserved now after a Moonshine restart.

@rat-moonshine
Copy link
Collaborator

VersionControlPlugin.xml looks like this

Thank you, for the reference @JoelProminic . I was almost forgot this.

I fixed a couple of things which was causing you this:

  1. Cleared Git and SVN paths in Settings
  2. Performing Git -> Grant Permission opens Repository Browser [Bug]
  3. In Moonshine Settings, Git path auto-set as /usr/local/Cellar/subversion/1.14.0_6/bin/usr/bin/git [Bug]
  4. In Moonshine Settings, SVN path auto-set as /usr/local/Cellar/subversion/1.14.0_6/bin/usr/bin/svn [Bug]

Please, try by the above steps again and see if you can reproduce the problems again.

@rat-moonshine
Copy link
Collaborator

rat-moonshine commented Jun 29, 2021

@JoelProminic reported this in following steps:

  1. Clear Git and SVN paths in Moonshine Settings
  2. Open "Getting Started"
  3. Enable "By Software" view
  4. Configuration icon for "Git" entry is not showing, however it's showing in "By Feature" view
    image

I also noticed that clicking on the Configure icon for Subversion entry opens the Xcode permission window which suppose not be open in case of Subversion after the original-issue changes:
image

The exclamation icon also not suppose to be appear for Subversion entry in Getting Started.

rat-moonshine added a commit to Moonshine-IDE/Moonshine-SDK-Installer that referenced this issue Jun 29, 2021
rat-moonshine added a commit to Moonshine-IDE/Moonshine-SDK-Installer that referenced this issue Jun 29, 2021
rat-moonshine added a commit that referenced this issue Jun 29, 2021
- No configure-notes for Subversion
(#849)
@rat-moonshine
Copy link
Collaborator

Following things fixed against #849 (comment):

  • Showing configure icon for Subversion when it is not available, in Moonshine
  • Removal of available-note (exclamation icon) based on Xcode/CommandLineTools presence for Subversion
  • Opening Moonshine Settings upon clicking on configure icon for Subversion, instead of opening Xcode permission window

@JoelProminic
Copy link
Contributor Author

When I first updated to the newest version, SVN and Git were in a bad state. I'm not sure how I had them set before the update:

  • Git was set to be based on the SVN path instead of XCode
  • SVN was not set

I suspect this but was a carry-over from the problems in the master build, but we need to be careful that we don't break the existing configuration on an update.

I didn't see this behavioron a fresh setup. I installed the new build (branch build 412), and I saw this behavior:

  1. Clear SVN and Git Path in Moonshine
  2. Restart Moonshine
  3. Getting Started opens. Subversion is not set, and Git is set but shows a warning
  4. Check the Settings. Both the Git Binary and SVN Binary are not set
  5. Git > Grant Permission
  6. Clone a project - this works
  7. Subversion > Manage Repositories
  8. Double-click a project. It shows an error: "Subversion is unavailable. Unable to Browse the related repositories"
  9. Try to checkout a project. This takes you to Settings > Subversion, but does not close Manage REpositories.
  10. Set the SVN binary and save
  11. Open SVN > Manage Repositories and checkout a project - this works
  12. Restart Moonshine again
  13. Confirm that Git and SVN are set properly in the settings
  14. Confirm that the menu shows Git > Manage Repositories and SVN > Manage Repositories

I confirmed your updates from your previous comment. However, be aware that we may also need to have a similar Grant Permission step for the HomeBrew installation. We can experiment with this more as we work on Moonshine-IDE/Moonshine-SDK-Installer#31

@JoelProminic
Copy link
Contributor Author

When I first updated to the newest version, SVN and Git were in a bad state. I'm not sure how I had them set before the update:

* Git was set to be based on the SVN path instead of XCode

* SVN was not set

I confirmed that this is the behavior when I setup the paths on the branch build and then install the master build. So, this should only be a problem when testing the builds.

However, we should review how this will work for:

  • upgrading from the expected state for the 3.1.1 build. Do we need extra cleanup logic here?
  • Running on an older version of macOS that has SVN included in XCode. In this case, the user will currently have to manually choose the paths for either case (which requires the CMD-Shift-G trick), at least until we implement Install SVN Using MacPorts Moonshine-SDK-Installer#31

I haven't noticed any other remaining problems, so it is fine to merge this.

@rat-moonshine
Copy link
Collaborator

This issue now merged onto master.

@rat-moonshine rat-moonshine added test ready Feature/bug ready for testing and removed in-progress labels Jul 5, 2021
@JoelProminic
Copy link
Contributor Author

@feather812002, this should help resolve the errors you had for generating the on-disk-project update site.

@rat-moonshine
Copy link
Collaborator

While testing the merged build with @JoelProminic we noticed a couple of issues:

  1. Clicking on configure icon for Git entry always opens me the 'grant permission' popup even when the permission has given. For Joel clicking on configure icon does nothing at all.
  2. A manual refresh feature is not present in Haxe version of Getting Started (this could be a separate issue, though)
  3. An auto-update check during opening of Haxe version of Getting Started seems to be not happening (needs to be investigated)

@rat-moonshine
Copy link
Collaborator

rat-moonshine commented Jul 7, 2021

Clicking on configure icon for Git entry always opens me the 'grant permission' popup even when the permission has given. For Joel clicking on configure icon does nothing at all.

This should be fixed now and should opens the git-settings view in case Git is already present.

I've moved the other two problems here as they are unrelated to the original issue.

@JoelProminic
Copy link
Contributor Author

I would like to do a full test on macOS (including clone and checkout examples) and a quick test on Windows, and if there are no problems we can close this issue.

@rat-moonshine
Copy link
Collaborator

rat-moonshine commented Aug 19, 2021

Here are my tests from SVN basic functionalities in Moonshine, on macOS and Windows.

macOS : Using homebrew installation

Function Worked Properly Observation
Checkout Yes Authentication window do not auto-close after providing auth-information for a private repository
Commit Yes -
Update Yes Opened file/editor prompt for an update if the particular file downloaded with different editing time (#633 )
Browse (Manage Repository) Yes -same as Checkout-

Windows

Function Worked Properly Observation
Checkout Yes
Commit Yes
Update Yes
Browse (Manage Repository) Yes

@piotrzarzycki21
Copy link
Collaborator

Cool if everything is working fine please close that ticket.

@rat-moonshine
Copy link
Collaborator

Authentication window do not auto-close after providing auth-information for a private repository

I've fixed the authentication window close during SVN processes.

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

No branches or pull requests

3 participants