Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

LocalSkillSource.listResources returns backslash-separated paths on Windows

Abierto
#1,541 1 comentario 0 reacciones 1 asignado Ver en GitHub

@hemasekhar-p ya está trabajando en esto.

Desde el 24/9/2026.

Evaluación

Este issue todavía no se ha evaluado.

Descripción

needs review

🔴 Required Information

Describe the Bug:

LocalSkillSource.listResources(skillName, resourceDirectory) turns each resource path, relative to the skill directory, into a string with Path.toString(), which uses the platform separator. On Windows it returns assets\file1.txt, while ClassPathSkillSource and InMemorySkillSource return assets/file1.txt for the same skill layout. So the result of SkillSource.listResources depends on both the implementation and the OS, and LocalSkillSourceTest.testListResources fails on Windows.

Steps to Reproduce:

  1. On Windows, check out main (4092a1f).
  2. Run ./mvnw -pl core test -Dtest=LocalSkillSourceTest.
  3. testListResources fails; see the log below.

Expected Behavior:

[assets/file1.txt, assets/subdir/file2.txt]: /-separated paths, as ClassPathSkillSource and InMemorySkillSource return and as the test expects. adk-python keys directory-loaded skill resources the same way since google/adk-python@bc2c97c ("Key directory-loaded skill resources with forward slashes").

Observed Behavior:

[assets\file1.txt, assets\subdir\file2.txt]

Environment Details:

  • ADK Library Version (see maven dependency): main at 4092a1f (1.10.1). The code has not changed since LocalSkillSource was added in 1.3.0.
  • OS: Windows 11
  • TS Version (tsc --version): N/A (Java: Microsoft OpenJDK 17.0.19; Maven 4.0.0-rc-3 via mvnw)

Model Information:

  • Which model is being used: N/A

🟡 Optional Information

Regression:

No. LocalSkillSource has used Path.toString() here since it was added in 1.3.0.

Logs:

[ERROR] Failures: 
[ERROR]   LocalSkillSourceTest.testListResources:96 value of      : blockingGet()
missing (2)   : assets/file1.txt, assets/subdir/file2.txt
unexpected (2): assets\file1.txt, assets\subdir\file2.txt
---
expected      : [assets/file1.txt, assets/subdir/file2.txt]
but was       : [assets\file1.txt, assets\subdir\file2.txt]
[ERROR] Tests run: 21, Failures: 1, Errors: 0, Skipped: 0

Additional Context:

CI runs only on Ubuntu, where Path.toString() already uses /, so the test passes there. I have a one-line fix ready and will link the PR here.

How often has this issue occurred?:

  • Always (100%) on Windows
Lenguaje dominante
Java
Estrellas
1.7k
Forks
421
Merge medio
3 d 10 h
PR fusionados (30 d)
34

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de google/adk-java

Todos los issues de google/adk-java

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.