Comments (5)
Confirmed fix at master. 👍
from sourcery.
I pushed a fix to master, would you mind taking a look whether it works for your codebase?
The commit with changes
Edit: according to @jpsim, treating key.offset / length as byteOffset is correct, so my fix of using that as characterOffset even if it passes sounds like a wrong approach.
Need to take a look at this again and see if there is anything there that we might be doing wrong, or is this sourcekitten bug and in that case fill a report for them
from sourcery.
Yeah, this is likely a bug in SourceKitten, and likely the same issue as realm/SwiftLint#1006.
We're investigating the following re-implementation, but since that breaks other things we haven't fully determined the scope of this issue:
func lineAndCharacter(forByteOffset offset: Int) -> (line: Int, character: Int)? {
let characterOffset = location(fromByteOffset: offset)
return lineAndCharacter(forCharacterOffset: characterOffset)
}
from sourcery.
And to reiterate from twitter, yes all offsets and lengths reported by SourceKit are in bytes.
from sourcery.
ok I think the master is working now, I used the suggestion for translating the byteOffset, once sourcekitten solves the internal issue we can go back to using old function. @toshi0383 can you confirm current master works for you? I added test but just to be sure
from sourcery.
Related Issues (20)
- [Question] Using Sourcery In Swift Package Executable HOT 4
- Errors when running unit tests HOT 2
- Get protocols that are implemented by the Element type of an array
- Some unit tests are executed for too long HOT 4
- Not able to build GraphQL target - Command PhaseScriptExecution failed with a nonzero exit code HOT 2
- SPM Installation, Sourcery Pro clarification HOT 3
- Xcode fails to find Sourcery. Shows Sourcery not installed error HOT 2
- Use .xcfilelist file as sources list file
- Protocol compositions in EJS templates
- 2.0.3 release was not completed HOT 1
- Crash in ParserResultsComposed.resolveType(typeName:containingType:) HOT 2
- Version 2.0.3 has significant performance issues HOT 16
- Linux Support: from experimental to 100% 🚀
- Mintfile issue when a new version of Sourcery is released HOT 9
- Issue when running sourcery from binary HOT 18
- Automate homebrew releases HOT 3
- XCLocalSwiftPackageReference is not supported HOT 6
- All releases/podspecs after 2.0.2 haven't been pushed to cocoapods HOT 2
- AssociatedType is missing annotaions property
- Linux unit tests fail HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sourcery.