Closed ymli0215 closed 5 months ago
看上去像是解析出问题了,有更全的 /write 我试试?
測試起來是在DevInsCompiler 的 val propElement = id.nextSibling?.nextSibling propElement 的 text 就只有 src/test/java/org/example/service/SpringRestServiceTest.java
例如下面這段
/write:src/test/java/org/example/service/SpringRestServiceTest.java#L3-L4 ```java package org.example.service; import org.example.GradleProjectApplication; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; import static org.junit.jupiter.api.Assertions.*; @SpringBootTest public class SpringRestServiceTest { } ```
应该是之前支持 #L2C0-L3C12 的时候,引入了 bug:
https://github.com/unit-mesh/auto-dev/commit/d524095392ac70cf1d47bda378baffcaa3ed86b8
請問一下 DevInUsed 得用途是什麼呢?? 因為沒看到他的原始碼,不太理解它的作用... 有看到一個txt檔案 : CommandAndSymbol.txt ,好像就定義了好幾種type 但是又不知道是哪何時parse過來的
其中的 DevInUsed 指的就是 used
,包含了 command,variable 、 agent 等类型的语法
原本 檔案名稱後面加上 #L1-L2 會針對指定的行數範圍去寫入內容,但是現在沒有作用 經過測試WriteInsCommand去呼叫LineInfo.fromString(argument)時 這個argument就沒有傳遞 #L1-L2,只有傳入filename而已