ice1000 / intellij-zig

The IntelliJ IDEA plugin for the Zig programming language ┗:smiley:┛ ┏:smiley:┓ ┗:smiley:┛ ┏:smiley:┓
GNU General Public License v3.0
113 stars 27 forks source link

invaild zig install path #43

Closed CDHon closed 1 year ago

CDHon commented 2 years ago

when i type my zig path(C:\Program Files\zig) in the install path, it told me "invaild zig install path", what should i type?

谢谢冰封哥

ice1000 commented 2 years ago

What's your zig version? Where is the zig executable located?

ice1000 commented 2 years ago

https://github.com/ice1000/intellij-zig/blob/master/src/org/ziglang/project/utils.kt#L44-L45

CDHon commented 2 years ago

What's your zig version? Where is the zig executable located?

zig-windows-x86_64-0.10.0.zip "C:\Program Files\zig\zig.exe"

I changed it to "C:\Program Files\zig\bin\zig.exe" and typed "C:\Program Files\zig", but it still dose not work.

CDHon commented 2 years ago

I tried "C:/Program Files/zig" and dose not work too.

CDHon commented 2 years ago

By the way, my system is window11, IDE is clion 2021.2.3.

ice1000 commented 2 years ago

I checked again. The message is generated by https://github.com/ice1000/intellij-zig/blob/fea6c724f7b7534b80d418966f4338999afa7d6f/src/org/ziglang/project/ui/ui-impl.kt#L57-L60 which uses the check https://github.com/ice1000/intellij-zig/blob/c3d9e90558e494bc84ee7c4df6cafff70ec235d7/src/org/ziglang/project/utils.kt#L39-L42

So you need to make sure that directory exists. I'm unsure if Zig has updated the dist format.

ice1000 commented 2 years ago

The code was changed to https://github.com/ziglang/zig/blob/78f26b970e1c5c288e45d0edd2ab2f229e6fe924/src/introspect.zig#L8-L34

So the plugin also needs to be updated

ice1000 commented 2 years ago

It's a surprise that Zig has changed their naming convention

ice1000 commented 2 years ago

可以帮我改改代码吗 谢谢茄子

CDHon commented 2 years ago

可以帮我改改代码吗 谢谢茄子

惭愧,我目前是个云程序员,不太懂编程

ice1000 commented 2 years ago

@anatol can you help 🥺🙏

anatol commented 2 years ago

@CDHon, what version of zig do you use? What version of the plugin do you use?

anatol commented 2 years ago

@CDHon I am not familiar with this part of the plugin. Please provide exact steps on how to reproduce the problem.

ice1000 commented 2 years ago

@CDHon I am not familiar with this part of the plugin. Please provide exact steps on how to reproduce the problem.

You basically reimplement the logic of validating the Zig SDK. It was just checking the existence of some files, but Zig changed the layout of the SDK and the logic of validation is also changed. The job is to adapt the changes.

ivanjaros commented 1 year ago

bump zig version 0.11.0-dev.85+694d8831c plugin 0.1.1

ivanjaros commented 1 year ago

Last release is still from Apr 26, 2019

ice1000 commented 1 year ago

Last release is still from Apr 26, 2019

I have uploaded an update.

ivanjaros commented 1 year ago

you have committed changes but haven't made a release.

ice1000 commented 1 year ago

you have committed changes but haven't made a release.

It's only accessible to me unless JetBrains has approved it, my dear Commercial Director. image

ivanjaros commented 1 year ago

you have committed changes but haven't made a release.

It's only accessible to me unless JetBrains has approved it, my dear Commercial Director. image

ah, right. i was talking about git repo release in here, so that we could manually install the plugin right away.

ice1000 commented 1 year ago

you have committed changes but haven't made a release.

It's only accessible to me unless JetBrains has approved it, my dear Commercial Director. image

ah, right. i was talking about git repo release in here, so that we could manually install the plugin right away.

I am unsure but maybe you can download the artifact from Circle CI. In a few days, you should be able to download it from IntelliJ marketplace.

ice1000 commented 1 year ago

I think it's probably unnecessary to upload release into two different places :)