Title: backend: libc 只在 Unix 使用,应移到 cfg(unix) 依赖,Windows 编译报 unused dependency · Issue #19 · Lithe-IDEA/lithe-plugin-java · GitHub
Open Graph Title: backend: libc 只在 Unix 使用,应移到 cfg(unix) 依赖,Windows 编译报 unused dependency · Issue #19 · Lithe-IDEA/lithe-plugin-java
X Title: backend: libc 只在 Unix 使用,应移到 cfg(unix) 依赖,Windows 编译报 unused dependency · Issue #19 · Lithe-IDEA/lithe-plugin-java
Description: 问题 backend/Cargo.toml:28 在通用 [dependencies] 里声明了 libc = "0.2",但全仓库只有 backend/src/project_settings.rs:378 的 #[cfg(unix)] 分支用到(options.custom_flags(libc::O_NOFOLLOW),搜索依据:grep -rn "libc::" backend crates)。 Rust 1.100 默认启用 cargo::unused_dep...
Open Graph Description: 问题 backend/Cargo.toml:28 在通用 [dependencies] 里声明了 libc = "0.2",但全仓库只有 backend/src/project_settings.rs:378 的 #[cfg(unix)] 分支用到(options.custom_flags(libc::O_NOFOLLOW),搜索依据:grep -rn "libc::" backend cr...
X Description: 问题 backend/Cargo.toml:28 在通用 [dependencies] 里声明了 libc = "0.2",但全仓库只有 backend/src/project_settings.rs:378 的 #[cfg(unix)] 分支用到(options.custom_flags(libc::O_NOFOLLOW),搜索依据:grep -rn "lib...
Opengraph URL: https://github.com/Lithe-IDEA/lithe-plugin-java/issues/19
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"backend: libc 只在 Unix 使用,应移到 cfg(unix) 依赖,Windows 编译报 unused dependency","articleBody":"## 问题\n\n`backend/Cargo.toml:28` 在通用 `[dependencies]` 里声明了 `libc = \"0.2\"`,但全仓库只有 `backend/src/project_settings.rs:378` 的 `#[cfg(unix)]` 分支用到(`options.custom_flags(libc::O_NOFOLLOW)`,搜索依据:`grep -rn \"libc::\" backend crates`)。\n\nRust 1.100 默认启用 `cargo::unused_dependencies`,在 Windows 目标(`x86_64-pc-windows-gnu` / `-msvc`)编译时报:\n\n```\nwarning: unused dependency `libc`\n --> backend\\Cargo.toml:28:1\n```\n\n代价:Windows 构建多一个无用依赖和警告;一旦 CI 对警告设 `-D warnings`(clippy 已经是),发版工作流的 Windows 任务会失败。\n\n由 #16(2248d64)引入,在 #18 的 Windows 虚拟机验证中发现。(仓库没有 `refactor` 标签,未加标签。)\n\n## 建议方案\n\n把 `libc` 移到 `[target.'cfg(unix)'.dependencies]`,`Cargo.lock` 不变。风险:无,Unix 行为不变。","author":{"url":"https://github.com/1lck","@type":"Person","name":"1lck"},"datePublished":"2026-11-16T14:24:05Z","url":"https://github.com/Lithe-IDEA/lithe-plugin-java/issues/19"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:27eae7be-2dc9-bbd6-60bc-a25125340096 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A4DE:F286:4022657:564697E:6B07129B |
| html-safe-nonce | ad66675e9194ef2817ce532f74635b7d1528de1b63943ceb18628ad2e4a80e2a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNERFOkYyODY6NDAyMjY1Nzo1NjQ2OTdFOjZCMDcxMjlCIiwidmlzaXRvcl9pZCI6IjI3MDEyOTUxMzI1ODE3NjE2OTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c2fabec48cec9259eb47add1114c454e7ba2d3fd007d7588331f6e62a73b5f02 |
| hovercard-subject-tag | issue:6423331581 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/Lithe-IDEA/lithe-plugin-java/19/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3626afd789def04a4da936097f83eeedc78f1b6a6dfc3347cb3ab5401491a66b/Lithe-IDEA/lithe-plugin-java/issues/19 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3626afd789def04a4da936097f83eeedc78f1b6a6dfc3347cb3ab5401491a66b/Lithe-IDEA/lithe-plugin-java/issues/19 |
| og:image:alt | 问题 backend/Cargo.toml:28 在通用 [dependencies] 里声明了 libc = "0.2",但全仓库只有 backend/src/project_settings.rs:378 的 #[cfg(unix)] 分支用到(options.custom_flags(libc::O_NOFOLLOW),搜索依据:grep -rn "libc::" backend cr... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | 1lck |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9aaa1abe1aaef39a8543ab08df7a776c3243275815d741d29afa7b02148ca05e |
| turbo-cache-control | no-preview |
| go-import | github.com/Lithe-IDEA/lithe-plugin-java git https://github.com/Lithe-IDEA/lithe-plugin-java.git |
| octolytics-dimension-user_id | 340144206 |
| octolytics-dimension-user_login | Lithe-IDEA |
| octolytics-dimension-repository_id | 1446370282 |
| octolytics-dimension-repository_nwo | Lithe-IDEA/lithe-plugin-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1446370282 |
| octolytics-dimension-repository_network_root_nwo | Lithe-IDEA/lithe-plugin-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 44c43783771de038e2c401dd343799000e8d1253 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width