feat: Add Rust, Go, and Ruby language support + runner bug fixes#8
Merged
Conversation
- Language enum에 RUST/GO/RUBY 추가 + 플랫폼별 기본 템플릿 - CodeRunner: 컴파일/실행, 프로그래머스식 solution 래퍼, 툴체인 자동 탐지 (~/.cargo/bin, /usr/local/go/bin, rbenv 등, Windows .exe 처리) - 제출 매핑: LeetCode(rust/golang/ruby), Codeforces, 프로그래머스(Go/Ruby) Rust는 프로그래머스 미지원 안내 처리, SWEA는 제출 미지원(-1) - ProblemFileManager 확장자 목록을 Language enum에서 파생하도록 변경 실행기 버그 수정: - 빈 입력 시 stdin을 닫지 않아 EOF 미전달로 허위 시간 초과 발생 + FD 누수 - kotlinc에 -J-Dfile.encoding=UTF-8 추가 (javac -encoding과 동일 목적, 이슈 #2) - 중복 클래스 오류 필터가 Windows 경로 구분자(\)를 처리하지 못하던 문제
- 지원 언어 표에 JavaScript 누락 보완 + Rust/Go/Ruby 추가
- 시험 모드 제한 4가지 → 실제 5가지 (Code Vision 끄기 누락 보완)
- 최소 IDE 버전 2024.1 → 2024.3 (sinceBuild=243)
- fetch.md 생성 폴더 구조를 실제 구조로 수정 (problems/{플랫폼}/{난이도}/...)
- 설정 언어 변경 안내문 한·영 동시 표시 문구 제거 (v1.0.8에서 변경됨)
- 소스 빌드 JDK 21 필요 명시, My Solved 기능 표 추가
문제를 다 푼 뒤 제출 시점에야 미지원을 알게 되는 상황 방지. - Language.isSubmittable(source): 제출 가능 매트릭스 단일 진실 원천 - ProblemPanel: 콤보 변경 즉시 '제출 미지원 (로컬 테스트만 가능)' 경고 라벨
two_sum/twoSum 네이밍, Rust impl Solution(struct 보충), 문자열·2차원 배열 인자 변환을 실제 exampleTestcases 입력 포맷으로 검증. 툴체인 없으면 스킵.
runIde 실사용 테스트 중 SlowOperations SEVERE 다수 발생: 콤보 변경·로그인·가져오기·제출 시 AuthService.readCookies/writeCookies와 GitHubService.readToken이 EDT에서 OS 키체인에 동기 접근. 메모리 캐시로 즉시 응답하고 영속화는 단일 스레드 executor로 백그라운드 처리 (쓰기 순서 보장). 서비스 초기화 시 캐시를 예열해 첫 EDT 읽기도 커버.
- boj-*.png 4장 삭제 (v1.4.0에서 제거된 백준 UI가 그대로 노출되던 문제) - 가져오기 예시는 problem-view-1.png, 제출 흐름은 fetch-test-submit.gif로 교체 - README EN/KO 섹션 간 이미지 구성 일치화
서비스 캐시 예열(백그라운드)이 끝나기 전에 ProblemPanel 생성자가 EDT에서 버튼 상태를 읽어 폴백 경로로 키체인에 접근하던 문제. 초기 버튼 갱신을 캐시 예열 후 invokeLater로 옮기고, 코드포스 크롤링에 로그인 쿠키 전달 추가 (cf_clearance로 Cloudflare 통과 시도, Chrome UA 정합)
Cloudflare가 Jsoup(Java TLS 지문)을 403으로 차단하는 경우 대응: 로그인 쿠키(cf_clearance) 전달로도 안 뚫리는 것을 실기기에서 확인. SweaJcefFetcher와 동일 패턴으로 실제 Chromium(JCEF)이 챌린지를 통과한 뒤 렌더링된 HTML을 추출해 기존 파서(parseProblemHtml)로 처리. HTTP 크롤링 실패 시에만 폴백으로 동작.
한쪽 탭에서 언어를 바꾸면 다른 탭의 언어 콤보도 자동으로 맞춰짐. setLanguage가 동일 값이면 무시하므로 콜백 순환이 발생하지 않음.
- fetch.md: 코드포스 소절 추가 (Cloudflare 차단 시 JCEF 자동 폴백, 5~20초 소요) - test.md: Problems ↔ Tests 언어 선택 양방향 동기화 안내 - submit.md: 제출 미지원 조합 선택 시 즉시 경고 표시 설명 - README 3종: 언어 표 각주 및 가져오기 섹션에 요약 반영
- 지원 언어 목록에 Rust/Go/Ruby 추가 (설명 EN/KO + 로컬 테스트 항목) - 제출 가능 여부 안내 문구 추가 (미지원 조합 선택 시 즉시 경고) - change-notes에 v1.5.0 항목 작성 (EN/KO)
Owner
Author
|
Post-merge follow-up: the CI failures on this PR's runs were false "compile timeout" errors — the compile timeout was tied to the test-case run limit (5s × 2), which cold-cache 2-core CI runners exceed for Fixed in a714575 (compile timeout separated into a dedicated 60s constant). Verify Plugin is now green on both ubuntu and windows: https://github.com/dj258255/codingtestkit/actions/runs/28747918535 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #7
Language Support (Issue #7)
RUST,GO,RUBYto theLanguageenum with default templates for each platform~/.cargo/bin,/usr/local/go/bin, rbenv shims, Homebrew paths, etc.). Handles Windows whererustc/go builddon't auto-append.exe(unlike MinGW g++)[1,2,3]→vec![1,2,3]/[]int{1,2,3}). Go usesjson.Marshalto avoidfmt.Println's[1 2 3]formatting; Rust uses{:?}+ whitespace compaction to match the existing output convention. Handles LeetCode's real initial-code shapes (impl Solution+two_sum,twoSum, etc.)sweaId = -1)UX Improvements
Language.isSubmittable(source)matrix; also covers existing combos like Kotlin/JavaScript × SWEACodeforces: Cloudflare-resistant fetching
Codeforces problem crawling was being blocked by Cloudflare (HTTP 403 — TLS fingerprint detection, confirmed unfixable via cookies/UA alone in real-device testing). Fetching now falls back automatically to an offscreen JCEF (embedded Chromium) fetcher that passes the challenge and feeds the rendered HTML to the same parser (mirrors the existing
SweaJcefFetcherpattern). Login cookies are also forwarded to the HTTP attempt.Bug Fixes (found during this work)
-J-Dfile.encoding=UTF-8(same purpose as thejavac -encoding UTF-8fix from issue Windows 환경에서 Java 코드 컴파일 시 인코딩 오류 발생 (unmappable character) #2)\)AuthServicecookies andGitHubServicetoken were read/written from the EDT via OS keychain on tool-window creation, combo changes, login, fetch, and submit — caught live duringrunIdetesting. Now served from in-memory caches with ordered background persistenceDocumentation
Verification
runIdesandbox: LeetCode fetch→local test→submit with Rust (initial code, language dropdown auto-switch, code injection all confirmed) and Codeforces fetch (JCEF fallback through Cloudflare)→local test→submit with Rust, both confirmed working by handgofilter + fetch, all default templates compile and run (rustc 1.96 / go 1.26 / ruby 2.6)