maks / MGit

A Git client for Android.
https://manichord.com/projects/mgit.html
GNU General Public License v3.0
1.24k stars 166 forks source link

Text Rendering and Syntax Highlighting failure with Fortran (possibly other languages too) #8

Open maks opened 8 years ago

maks commented 8 years ago

From @aphirst on September 2, 2016 15:30

SGit 1.3.2 from Google Play Cyanogenmod 13.0 (Android 6.0.1)

I have many .f90 files (Fortran) in my repositories, and I get the following error when trying to preview them:

Uncaught Error: Unknown language: "fortran" -- From line 1 of file://android_asset/js/highlight.js

Other text filetypes appear to work fine (plaintext, .m), along with syntax highlighting, but obviously there are many filetypes I did not test.

If additional info would be useful, I'm happy to provide it: please just ask. :smile:

Copied from original issue: sheimi/SGit#252

maks commented 8 years ago

From @aphirst on September 28, 2016 13:10

I just updated SGit from the Play Store, and things seem different but equally bad. Syntax Highlighting doesn't appear to work at all for .m files any more, and trying to set the language to Fortran causes the app to crash.

maks commented 8 years ago

@aphirst sorry I can't replicate this crash myself. Could you provide a url to a public repo that causes this to occur. What I did was:

  1. create a new local repo (using "Clone Repo", pressing "Init Local" button)
  2. create a new file within SGit (using menu) named test,m
  3. put in hello world code:
 program hello
          print *, "Hello World!"
       end program hello
  1. Saved and used the menu to set the language to Fortran.

The syntax highlighting indeed doesn't work but neither does SGit crash. I tested on an emulator running 6.0.1 and 5.1 so this maybe an issue with Cyanogenmod. I'm not sure if Cyanogenmod retains the functionality that shows a dialog allowing you to submit a crash report to Play Store when an app crashes, but if you could do that, I would be able to look into this in more detail.

maks commented 8 years ago

@aphirst If you could also attach here a minimal sample of Fortran code that causes the crash that would also be of great help - thanks.

maks commented 8 years ago

From @aphirst on October 6, 2016 12:0

@maks Sorry about the delay.

  1. I did indeed get the Play Store App crash dialog, and I submitted something, but I'm not sure whether it ended up actually getting to you.
  2. I'm actually now somewhat struggling to reproduce the crash. If I can get it to happen again, I'll submit some code (I'll need to sterilise it somehow, as most of my code pertains to work, and also then hope that the crash still occurs after the sterilisation...).
maks commented 8 years ago

@aphirst not a problem - I'll close this issue for now but please feel free to reopen if you are able to reproduce it consistently again.

maks commented 8 years ago

From @aphirst on October 7, 2016 9:17

@maks Is the lack of syntax highlighting also intentional?

maks commented 8 years ago

Actually thats a good point, the syntax highlight should work so I'll re-open this issue to track getting that fixed.

maks commented 8 years ago

From @rix1337 on October 19, 2016 6:11

Same for my python files

kb-1000 commented 6 years ago

Maybe it should be documented that CodeMirror is used? Then someone would (maybe) update the version of it.

maks commented 6 years ago

@kaeptmblaubaer1000 my plan is to split the editor out into its own component as I'm not that happy with having it be embedded within MGit, I'd like to keep MGit focused on being just a git client.