osfans / trime

同文安卓輸入法平臺3.x/Android-rime/Rime Input Method Engine for Android
http://osfans.github.io/trime/
GNU General Public License v3.0
3.08k stars 372 forks source link

Alert on failed deployments #784

Closed InfinityLoop1308 closed 1 year ago

InfinityLoop1308 commented 2 years ago

Describe the bug Can not update theme file. When updating the theme file in rime/, neither deploy action nor changing theme action can be used to generate a built theme file in rime/build. Say the theme is my_theme.yaml, if I delete the rime/build/my_theme.yaml, I will never have access to this theme.

To Reproduce Steps to reproduce the bug:

  1. make any change in rime/my_theme.yaml
  2. try any method to apply change in rime/build/my_theme.yaml

Expected behavior rime/build/my_theme.yaml should be update correctly.

Log NA

Screenshots NA

Smartphone (please complete the following information): NA

Additional context NA

tumuyan commented 2 years ago

only select theme in theme picker or build folder not have the theme, the keyboard will be updated. it is a feature to save time, not a bug

InfinityLoop1308 commented 2 years ago

only select theme in theme picker or build folder not have the theme, the keyboard will be updated. it is a feature to save time, not a bug

Can you describe this procedure in detail? I can't reproduce it.

tumuyan commented 2 years ago

Never modify theme in build path. modify theme in user path and you have 2 ways to apply change:

  1. open theme picker, select theme
  2. delete theme in build path and kill trime
InfinityLoop1308 commented 2 years ago

Never modify theme in build path. modify theme in user path and you have 2 ways to apply change:

1. open theme picker, select theme

2. delete theme in build path and kill trime

so that is literary what I have done. and no changes are applied. And I am assuming this is because build/my_theme.yaml is not updated, and that should be a bug.

tumuyan commented 2 years ago

I couldn't repeat the bug

InfinityLoop1308 commented 2 years ago

I make a more detailed version.

To Reproduce Steps to reproduce the bug

  1. make any change in rime/my_theme.yaml
  2. open theme picker, select theme
  3. no changes applied, and `rime/build/my_theme.yaml is not updated.
  4. rename rime/build/my_theme.yaml to rime/build/test.yaml
  5. kill trime, restart.
  6. rime/build/my_theme.yaml is not generated, and I can not select this theme in theme picker

I couldn't repeat the bug

Try this.

iovxw commented 2 years ago

Is your theme valid? If any files in build are not generated, check the JNI log (try https://github.com/iovxw/miniglog/tree/add-flags)

InfinityLoop1308 commented 2 years ago

Thank you all for help. It turns out the config_version controls the update behavior. After I changed the value, the theme is updated properly.

InfinityLoop1308 commented 2 years ago

So in fact nothing is changed 3 days ago. This issue should be reopened.

The easiest way to reproduce this bug:

  1. add a theme file, say test.yaml, to /sdcard/rime/
  2. you are never able to access this theme, Deploy, restart or force stop... nothing works.

Related issue: #706, #649 This issue should have a high priority since it destroy the user experience.

InfinityLoop1308 commented 2 years ago

I find a solution: https://github.com/osfans/trime/issues/649#issuecomment-1002414493. That is really a weird behavior, can be make some change?

Edit: it only works once. I don't know why.

tumuyan commented 2 years ago

Never modify theme in build path. modify theme in user path and you have 2 ways to apply change:

  1. open theme picker, select theme
  2. delete theme in build path and kill trime

I have never found the bug.

I find a solution: #649 (comment). That is really a weird behavior, can be make some change?

Edit: it only works once. I don't know why.

Deploy only apply scheme , not build theme . it is a feature to save time not a bug.

InfinityLoop1308 commented 2 years ago

Deploy only apply scheme , not build theme . it is a feature to save time not a bug.

That is not a reasonable excuse. If you remove the function, you should at least provide a reliable way for users to do it manually. The fact is, some users can not build their themes automatically, and they should have a solution to build their themes manually in this case.

InfinityLoop1308 commented 2 years ago

Deploy only apply scheme , not build theme . it is a feature to save time not a bug.

And this is a wrong statement as trime.yaml is build every time when I deploy.

tumuyan commented 2 years ago

And this is a wrong statement as trime.yaml is build every time when I deploy.

I think others thing with yours themes. in my phone, the trime.yaml never build until user select the theme. you could find the build time for trime.yaml, others theme, and schemes in my screenshot

Screenshot_2022-07-03-09-37-01-217_nextapp fx

. The fact is, some users can not build their themes automatically, and they should have a solution to build their themes manually in this case.

theme picker works well and it could build theme when the choused theme is changed

InfinityLoop1308 commented 2 years ago

And this is a wrong statement as trime.yaml is build every time when I deploy.

I think others thing with yours themes. in my phone, the trime.yaml never build until user select the theme. you could find the build time for trime.yaml, others theme, and schemes in my screenshot

. The fact is, some users can not build their themes automatically, and they should have a solution to build their themes manually in this case.

theme picker works well and it could build theme when the choused theme is changed

So the problem is that Trime has very different behavior across users. We can just both hold our view of points until somebody find out the reason. As users who have trouble building themes can still update their theme by modify the theme file in the build folder directly, it is not a fatal problem, but still needs to be fixed.

InfinityLoop1308 commented 2 years ago

Solved.

Trime will not do anything (or throw any error) when a theme/schema is invalid. After fixing the errors it works normally.

Bambooin commented 1 year ago

We add deployment log in #866.