-
-
Notifications
You must be signed in to change notification settings - Fork 404
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
[Bug]: Suggestion feature is disabled for non-gitignored files. #400
Comments
same issue |
Does it work if you turn on "Disable git ignore check" in the advanced settings? |
Yes. |
A new build is released that disable the check by default. I am using this code to check if the file is ignored, I would be great if you can try it in a playground. Please let me know the output. Thanks. If it throws, that means the file is not ignored. let filePath = "/Users/intitni/developer/Projects/Copilot for Xcode/PLUS"
let projectPath = "/Users/intitni/developer/Projects/Copilot for Xcode"
let it = Process()
it.arguments = ["-i", "-c", "git check-ignore \"\(filePath)\""]
it.currentDirectoryURL = URL(fileURLWithPath: projectPath)
it.executableURL = .init(fileURLWithPath: "/bin/bash")
let outputPipe = Pipe()
it.standardOutput = outputPipe
it.standardError = outputPipe
it.terminationHandler = { _ in
do {
if let data = try outputPipe.fileHandleForReading.readToEnd(),
let content = String(data: data, encoding: .utf8)
{
print("return", content)
}
} catch {
print("throw", error)
}
}
try it.run() |
"Disable git ignore check" is work for me. |
@GeRryCh How about removing "-i" from the argument list? |
I think I was wrong about the return value... |
Something in my configuration is making the task throws on my Mac which made me think that it should throw for not in gitignore. In fact it returns nothing. Which should be handled in the missing else case that the content can't be parsed. let filePath = "/Users/intitni/developer/Projects/Copilot for Xcode/PLUS"
let projectPath = "/Users/intitni/developer/Projects/Copilot for Xcode"
let it = Process()
it.arguments = ["-c", "git check-ignore \"\(filePath)\""]
it.currentDirectoryURL = URL(fileURLWithPath: projectPath)
it.executableURL = .init(fileURLWithPath: "/bin/bash")
let outputPipe = Pipe()
it.standardOutput = outputPipe
it.standardError = outputPipe
it.terminationHandler = { _ in
do {
if let data = try outputPipe.fileHandleForReading.readToEnd(),
let content = String(data: data, encoding: .utf8)
{
print("return", content)
} else {
print("not ignored")
}
} catch {
print("throw", error)
}
}
try it.run() |
Removing all arguments gives the error: |
@GeRryCh Please give this version a try https://github.com/intitni/CopilotForXcode/releases/download/0.28.1/Copilot.for.Xcode.app.fixed.zip
You have to keep the "-c" or it will treat the string as the path to program. |
In the version you've sent, it seems to be working regardless of whether the 'gitignore check' flag is selected! 👏 |
Thank you for reporting, it's now fixed in 0.28.2! |
Before Reporting
What happened?
After the upgrade to 0.28.0, I'm receiving a "suggestion feature is disabled" error for all my files across all projects. Dumping the prior version solved the issue.
How to reproduce the bug.
It just happens!
Relevant log output
No response
macOS version
13.5.2
Xcode version
15.0.1
Copilot for Xcode version
0.28.0
Node version
20.2.0
The text was updated successfully, but these errors were encountered: