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

feat: add Haxe support #4395

Merged
merged 18 commits into from Dec 4, 2022
Merged

feat: add Haxe support #4395

merged 18 commits into from Dec 4, 2022

Conversation

AlexHaxe
Copy link
Contributor

Description

This adds a Haxe module that will display currently installed / active Haxe version when in a directory that contains Haxe related files and folders, e.g. files ending with .hx or .hxml, or a folder named .haxelib or haxe_libraries or specific file names used in Haxe development environments.

module detects Haxe version either by looking at contents of .haxerc file (which implies use of lix package manager) or by calling haxe --version.

Motivation and Context

As a developer working on Haxe projects you might have different Haxe versions installed on your system (like current release version and a nightly build) and you switch between them to e.g. test compatibility.

How Has This Been Tested?

This module is similar to e.g. nim module so I took that as a template. I rewrote and added test cases to reflect the differences of Haxe module. then I ran test cases to until all were green. I also ran a debug build during development in my local bash environment.

  • I have tested using MacOS
  • I have tested using Linux
  • I have tested using Windows

Checklist:

  • I have updated the documentation accordingly.
  • I have updated the tests accordingly.

@AlexHaxe AlexHaxe mentioned this pull request Sep 22, 2022
1 task
src/modules/haxe.rs Outdated Show resolved Hide resolved
src/modules/haxe.rs Outdated Show resolved Hide resolved
src/configs/haxe.rs Outdated Show resolved Hide resolved
src/modules/haxe.rs Outdated Show resolved Hide resolved
src/modules/haxe.rs Outdated Show resolved Hide resolved
src/modules/haxe.rs Outdated Show resolved Hide resolved
src/modules/haxe.rs Outdated Show resolved Hide resolved
AlexHaxe and others added 4 commits October 30, 2022 23:31
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
removed check for "null" string
@davidkna davidkna merged commit 2766c78 into starship:master Dec 4, 2022
@davidkna
Copy link
Member

davidkna commented Dec 4, 2022

Thanks for the contribution!

@AlexHaxe AlexHaxe deleted the add_haxe branch December 4, 2022 17:34
@AlexHaxe
Copy link
Contributor Author

AlexHaxe commented Dec 4, 2022

cheers, and thank you for taking the time to give feedback and do code reviews!

Indyandie pushed a commit to Indyandie/starship that referenced this pull request Jul 26, 2023
* Add Haxe support

* avoid unwrap

* fix doc formatting

* removed extra newline

* fixed formatter and linter issues

* fixed config file

* better version of detecting contents of .haxerc

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>

* removed openfl related defaults from detect_files

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>

* fixed formatting

* reworked reading .haxerc with fallback to haxe --version

* fixed formatting

* added fallback to executable for dev paths in .haxerc

* fixed linter issue

* added support for Windows paths

* use or_else

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>

* use shorter version with `?`

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>

* simplified regex check

removed check for "null" string

* fixed format

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
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.

None yet

2 participants