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 plugin: run configuration maintenance/refactoring #456

Merged
merged 6 commits into from
Mar 7, 2020

Conversation

dkimitsa
Copy link
Contributor

Why

Idea run configuration might become invalid if configured items become invalid, like:

  • simulator is not available in next xcode;
  • signing identity or provision profile expired or removed;

Configuration editor was hiding errors

In this case compilation failed with runtime exception. But once run configuration editor is opened instead of pointing to invalid items editor was auto picking up first one available. As result user was not able to see a problem and to have configuration overridden changes to it to be done. Otherwise apply button was not active.

Name instead unique id was used as identifier

To identify signing identity/simulator/provisioning profile its name was saved. For auto value just auto text placeholder was saved and checked against. This is subject for name collisions.

Whats changed

Auto mode explicitly specified

Field that might be auto (Signing identity/Provisioning profile/Simulator) are now have separate parameter in config file that specifies entry type: auto or explicit ID.
And auto mode is identified by it and not string constant in entry name.

Explicit identifier instead of name

When explicit entry is used (e.g. not auto) entries id is saved instead of entry name (udid for profile/simulator, footprint for signing identity). No collision anymore.

Auto mode for simulator

Simulator field receives two modes auto iPhone and auto iPad. These modes acts similarly to gradle's one 'launchIPhoneSimulator'/launchIPadSimulator.
Also in case there is no simulator available in system it will allows to recover broken run configuration.

Quick fix for broken fields

Problem fields can be quick fixed to auto value with Fix button.

arm64 is default for device target

Default thumbv7 was a problem as is not available since ios11 (on most devices today). This caused deployment error at very end of run cycle. Having arm64 default improves user experience.

no more x86 (32bit) option for ios11+ simulators

Similar issue to arm64. It 32bit code doesn't run on ios11+ simulators.

no more don't sign options

don't sign option was for usage with jailbroken ios devices. While having free provisioning from Apple this option have no more sense. Also ldid binary was removed. If don't sign option is specified from gradle/maven ADHOC signing will be performed.

bonus1: gradle import of template projects was fixed

Created from template gradle projects were broken due:

  • gradle was set to use RoboVM SDK (and it is not operational any more for tools);
  • Java source code level was set to Java12+;

Now: gradle uses internal JDK, java source level forced to Java8.

bonus2: added support for Apple Development certificates

These were not part of regex and were ignored when auto identity was specified.

bonus3: suppressed -559038737 error code

If simulator process is terminated by Idea strange error message was printed into console log:

Process finished with exit code -559038737

This code is UNKNOWN_CODE constant in Executor. Now it is being recognized and replaced with 0.

…and gradle was not working with it) and forcing java 8 for robovm module
…ration is not valid anymore (due simulator not available or signing identity is outdated) but edit configuration dialog doesn't show it has error and instead changes values to something that is valid now. But Idea doesn't see that there was any changes (and user sees the dialog as valid). As Idea doesn't see changes -- apply button is not valid and to apply (and replace broken config) user has to touch and do changes in dialogue.

this rework includes:
- now if value is not valid (not available anymore) it will be displayed as empty value in combobox (and configuration will be not valid)
- changed concept: together with valud (like signing identity) now kind of identity saved: either explicit or auto (before string was compared against special template to detect auto)
- when explicit value is used -- not name but its id/uuid|footprint is saved for explicit match
- simulator combo box now has two auto options: auto iPad and auto iPhone. It introduces auto functionality similar to one we have with gradle and also allows to recover broken configuration when no any simulator is not available at all in system (for this ComboBox shall contain any value and auto just work great for this)
- remove "don't sign" option as not used. also removed ldid tool for stub signature. instead if don't sign triggered by gradle binary will be signed with adhoc signature;
- arm64 is now default target for Device deployment;
- if simulator version >=11 it doesn't provide 32 bit version anymore
- preferred iphone device changed to from "iPhone 6" to "iPhone 8" as iPhone6 is not in recent simulators anymore
@Tom-Ski Tom-Ski merged commit 5228052 into MobiVM:jdk12 Mar 7, 2020
@dkimitsa dkimitsa deleted the jdk12_idea_runconfig_maintenance branch March 8, 2020 12:45
dkimitsa added a commit to dkimitsa/robovm that referenced this pull request Apr 9, 2020
* * fixed: using internal JDK for gradle(otherwise RoboVM sdk was used and gradle was not working with it) and forcing java 8 for robovm module

* * removed ldid tool for "dont code sign case". if this option is needed adhoc signature will be added

* * cosmetic: fixed Process finished with exit code -559038737 when simulator is interrupted from Idea

* * fixed: added support for `Apple Development` certificates in case auto lookup for signing identity is used

* * big rework to Idea "run configuration" to solve main issue: configuration is not valid anymore (due simulator not available or signing identity is outdated) but edit configuration dialog doesn't show it has error and instead changes values to something that is valid now. But Idea doesn't see that there was any changes (and user sees the dialog as valid). As Idea doesn't see changes -- apply button is not valid and to apply (and replace broken config) user has to touch and do changes in dialogue.
this rework includes:
- now if value is not valid (not available anymore) it will be displayed as empty value in combobox (and configuration will be not valid)
- changed concept: together with valud (like signing identity) now kind of identity saved: either explicit or auto (before string was compared against special template to detect auto)
- when explicit value is used -- not name but its id/uuid|footprint is saved for explicit match
- simulator combo box now has two auto options: auto iPad and auto iPhone. It introduces auto functionality similar to one we have with gradle and also allows to recover broken configuration when no any simulator is not available at all in system (for this ComboBox shall contain any value and auto just work great for this)
- remove "don't sign" option as not used. also removed ldid tool for stub signature. instead if don't sign triggered by gradle binary will be signed with adhoc signature;
- arm64 is now default target for Device deployment;
- if simulator version >=11 it doesn't provide 32 bit version anymore
- preferred iphone device changed to from "iPhone 6" to "iPhone 8" as iPhone6 is not in recent simulators anymore

* * fixed typos
dkimitsa added a commit to dkimitsa/robovm that referenced this pull request Apr 9, 2020
* * fixed: using internal JDK for gradle(otherwise RoboVM sdk was used and gradle was not working with it) and forcing java 8 for robovm module

* * removed ldid tool for "dont code sign case". if this option is needed adhoc signature will be added

* * cosmetic: fixed Process finished with exit code -559038737 when simulator is interrupted from Idea

* * fixed: added support for `Apple Development` certificates in case auto lookup for signing identity is used

* * big rework to Idea "run configuration" to solve main issue: configuration is not valid anymore (due simulator not available or signing identity is outdated) but edit configuration dialog doesn't show it has error and instead changes values to something that is valid now. But Idea doesn't see that there was any changes (and user sees the dialog as valid). As Idea doesn't see changes -- apply button is not valid and to apply (and replace broken config) user has to touch and do changes in dialogue.
this rework includes:
- now if value is not valid (not available anymore) it will be displayed as empty value in combobox (and configuration will be not valid)
- changed concept: together with valud (like signing identity) now kind of identity saved: either explicit or auto (before string was compared against special template to detect auto)
- when explicit value is used -- not name but its id/uuid|footprint is saved for explicit match
- simulator combo box now has two auto options: auto iPad and auto iPhone. It introduces auto functionality similar to one we have with gradle and also allows to recover broken configuration when no any simulator is not available at all in system (for this ComboBox shall contain any value and auto just work great for this)
- remove "don't sign" option as not used. also removed ldid tool for stub signature. instead if don't sign triggered by gradle binary will be signed with adhoc signature;
- arm64 is now default target for Device deployment;
- if simulator version >=11 it doesn't provide 32 bit version anymore
- preferred iphone device changed to from "iPhone 6" to "iPhone 8" as iPhone6 is not in recent simulators anymore

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

Successfully merging this pull request may close these issues.

2 participants