Giter Site home page Giter Site logo

Comments (14)

tristanlabelle avatar tristanlabelle commented on June 20, 2024 2

I'd be happy if you are willing to support me and in the long term eventually take them over.

Supporting this extension is actually interesting to The Browser Company, where I work. I'll be in touch when I have more info!

from vscode-swiftlint.

tristanlabelle avatar tristanlabelle commented on June 20, 2024 1

I implemented this fix and it works on my machine: #73 . I also want to propose #72

from vscode-swiftlint.

vknabel avatar vknabel commented on June 20, 2024

Hi @tristanlabelle, thanks for your suggestion! As I don't have access to a windows machine, I am not able to test the current build, but I created a beta build for this extension including your fix for windows. Could you give it a try?
1.8.4-beta.0

from vscode-swiftlint.

tristanlabelle avatar tristanlabelle commented on June 20, 2024

@vknabel I'm having issues with the vsix... I wonder if my VS Code is in a bad state 🤔

image

image

I installed it from the "Install from VSIX" command here:
image

from vscode-swiftlint.

vknabel avatar vknabel commented on June 20, 2024

That's weird. You did nothing wrong. Not sure why it isn't working though.
I created a new build with bumped dependencies. Eventually this solves your issue.
1.8.4-beta.1

from vscode-swiftlint.

tristanlabelle avatar tristanlabelle commented on June 20, 2024

My bad, I had swiftlint.enable = false in my user settings. The fix does not work, however. It's still trying to use /usr/bin/env.

image

from vscode-swiftlint.

vknabel avatar vknabel commented on June 20, 2024

Sorry for the delay. I've taken some time off.

It seems like shell commands need to be executed differently on windows. Does this release solves your issue?
https://github.com/vknabel/vscode-swiftlint/releases/tag/1.8.4-beta.3

from vscode-swiftlint.

tristanlabelle avatar tristanlabelle commented on June 20, 2024

@vknabel I will try it out during the week (no computer access right now), but I was just thinking that a fix to this problem would be to implicitly prepend /usr/bin/env in the code if running on unix systems and the swiftlint.path contains no slashes (ie it is the unqualified name of an executable). Windows' CreateProcess function will look in the %Path% by default so that will work there too.

It make a bit more sense too because swiftlint.path is currently more of a command line prefix than a path.

from vscode-swiftlint.

vknabel avatar vknabel commented on June 20, 2024

Back in time I did use a different function in the viscose extension which (in theory) would prefix everything with /usr/bin/env. But in some cases it did not work properly and it did not respect the local PATH variables of the user unless started from the shell itself.

On windows I now use the old way with a thin layer of compatibility. I hope this helps.

But I agree swiftlint.path is actually a prefix (an could in theory be set to swift run swiftlint etc).

from vscode-swiftlint.

vknabel avatar vknabel commented on June 20, 2024

Thanks a lot for your work and enthusiasm! Sadly I am currently unable to provide the deserved time and energy to this project and the other two extensions (vscode-swiftformat and vscode-apple-swift-format).

I'd be happy if you are willing to support me and in the long term eventually take them over.

from vscode-swiftlint.

vknabel avatar vknabel commented on June 20, 2024

Fixes have been released

from vscode-swiftlint.

oskargargas avatar oskargargas commented on June 20, 2024

At The Browser Company, we're fixing SwiftLint to run on Windows and have produced builds of it. This allows us to use the vscode-swiftlint extension almost out-of-the-box (...)

@tristanlabelle you mentioned that you have produced Windows builds of SwiftLint. Are they available somewhere? I've tried @compnerd Windows fork but to no success (build fails because of SourceKitten)

from vscode-swiftlint.

compnerd avatar compnerd commented on June 20, 2024

@oskargargas realm/SwiftLint#5030 is the patch set for the Windows support for SwiftLint, and jpsim/SourceKitten#769 is the patch set for SourceKitten. There is a prebuilt binary at https://github.com/thebrowsercompany/swift-build/releases/tag/SwiftLint-DEVELOPMENT-SNAPSHOT-2023-08-12-a which is the most recent one, but if there is a need, we should be able to trigger a newer build as well.

I'd love help to get the changes for SourceKitten through :)

from vscode-swiftlint.

oskargargas avatar oskargargas commented on June 20, 2024

Thanks @compnerd for the link. Works like a charm. (+/- CPU usage, but it's probably expected on apparently 10 year old CPU...)

I'd love help to get the changes for SourceKitten through :)

I'll take a look if only time allows. Have a few more days off but also some things planned.

from vscode-swiftlint.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.