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

String interpolation syntax for Text SwiftUI widget throws an error #26

Closed
kvenn opened this issue Oct 31, 2023 · 10 comments
Closed

String interpolation syntax for Text SwiftUI widget throws an error #26

kvenn opened this issue Oct 31, 2023 · 10 comments

Comments

@kvenn
Copy link

kvenn commented Oct 31, 2023

The following code shows an error

        Text("Updated \(startDate, style: .relative) ago")
            .font(.system(size: 10))
            .foregroundColor(Color.white.opacity(0.5))

Error:

'!', '#', '#if', '#keypath', '&', '(', '.', ':', ';', <, , , , , , , , , , , , , '?', Any, Self, '', _, await, defer, do, self, super, try, '{' or '}' expected, got '('

image

This error causes the rest of the file to not work too great.

@jansorg
Copy link
Owner

jansorg commented Apr 19, 2024

Thanks!
I've fixed this for the next update. The official grammar seems to be lacking a few enhancements, reported at swiftlang/swift-book#295

@jansorg jansorg closed this as completed Apr 19, 2024
@kvenn
Copy link
Author

kvenn commented May 12, 2024

Great! Looking forward to it 🥳

@jansorg
Copy link
Owner

jansorg commented May 12, 2024

The latest version should have the fix already. Or doesn't it work for you?

@kvenn
Copy link
Author

kvenn commented May 13, 2024

I think I'm on the latest and I'm still seeing it.

image image

@jansorg
Copy link
Owner

jansorg commented May 16, 2024

@kvenn That's weird, the latest version is 1.0.0, https://plugins.jetbrains.com/plugin/22150-swift-support/edit/versions/stable/527403
Try Help > Check for updates or verify the update at Settings > Plugins. Please let me know if it's still not working for you.

@kvenn
Copy link
Author

kvenn commented May 17, 2024

Very weird! I'm fully unable to update to that version. I've restarted the IDE, uninstalled and reinstalled the plugin, and tried downloading from web but it just deeplinks to 0.21.*.

@jansorg
Copy link
Owner

jansorg commented May 20, 2024

Are you saying that 0.21.* is installed when you download 1.0 at https://plugins.jetbrains.com/plugin/22150-swift-support/versions/stable/527403 and install manually via Settings > Plugins > (Gear wheel) > Install from disk?

@kvenn
Copy link
Author

kvenn commented May 21, 2024

Thanks for trying to help me through this lol. No idea why I'm struggling so hard.

image

Plugin 'Swift Support' (version '1.0.0.345-241') is not compatible with the current version of the IDE, because it requires build 241.15989.0 or newer but the current build is IU-241.14494.240

So I guess IntelliJ ultimate is lagging behind Intellij? And that's why the latest plugin isn't available to me.

@jansorg
Copy link
Owner

jansorg commented May 21, 2024

241.15989.0 is 2024.1.1, https://www.jetbrains.com/idea/download/other.html
IntelliJ Ultimate and Community have the same build number, 2024.1.1 should be available to you.

@kvenn
Copy link
Author

kvenn commented May 24, 2024

As we all had feared, it was indeed user error.

I had to use the JetBrains Toolbox App to update IntelliJ.

The bug is fixed and I see you've been hard at work making this plugin awesome! Just did the yearly subscription.

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

No branches or pull requests

2 participants