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

syntax: Reintroduction of header as fallback when filename doesn't match #3206

Closed
wants to merge 4 commits into from

Conversation

JoeKar
Copy link
Collaborator

@JoeKar JoeKar commented Mar 23, 2024

Fixes #3201

@JoeKar JoeKar marked this pull request as draft March 23, 2024 15:23
@JoeKar JoeKar force-pushed the fix/header-detection branch 2 times, most recently from 27df761 to c357d12 Compare March 23, 2024 15:51
@JoeKar JoeKar marked this pull request as ready for review March 23, 2024 15:58
@JoeKar
Copy link
Collaborator Author

JoeKar commented Mar 23, 2024

@dmaluka:
The MacOS build run one time fail, but currently I can't image why:
https://github.com/zyedidia/micro/actions/runs/8402687727/job/23012403628

I removed my last commit, added it partly again: ok
I removed my last commit, added it fully again: ok

Do you have an idea? I'd like to prevent further regressions.

Strange 🤔

@dmaluka
Copy link
Collaborator

dmaluka commented Mar 23, 2024

I haven't reviewed this PR yet (obviously) but I'm not sure if the extra complexity it adds is the right approach to the problem. The reason is: I've found that #2819, among other things, changed the meaning of the foundDef variable, so now it means not "we found the final syntax definition" but something different, and rather confusing. Which makes the entire code confusing, difficult to understand (and thus difficult to extend in a correct way), and actually buggy.

I already have a fix for foundDef but I haven't fully tested it yet.

After fixing foundDef, adding support for header matches together with signature matches should become trivial (I suppose).

@JoeKar
Copy link
Collaborator Author

JoeKar commented Mar 24, 2024

Closed as tracked with #3208 due to more clean and straight logic.

@JoeKar JoeKar closed this Mar 24, 2024
@JoeKar JoeKar deleted the fix/header-detection branch March 24, 2024 13:02
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

Successfully merging this pull request may close these issues.

Error detecting file type by signature
2 participants