diff --git a/community-build/src/scala/dotty/communitybuild/Fields.scala b/community-build/src/scala/dotty/communitybuild/Fields.scala index bbf729418a6b..c9b796b5018f 100644 --- a/community-build/src/scala/dotty/communitybuild/Fields.scala +++ b/community-build/src/scala/dotty/communitybuild/Fields.scala @@ -6,4 +6,4 @@ class FieldsDsl[V](v: V): inline def of[T]: Seq[T] = FieldsImpl.fieldsOfType[V, T](v) extension [V](on: V): - def fields = FieldsDsl(on) \ No newline at end of file + def reflectedFields = FieldsDsl(on) diff --git a/community-build/src/scala/dotty/communitybuild/FieldsImpl.scala b/community-build/src/scala/dotty/communitybuild/FieldsImpl.scala index 045f34271ea4..e47d8debd6e4 100644 --- a/community-build/src/scala/dotty/communitybuild/FieldsImpl.scala +++ b/community-build/src/scala/dotty/communitybuild/FieldsImpl.scala @@ -12,6 +12,6 @@ object FieldsImpl: def isProjectField(s: Symbol) = s.isValDef && s.tree.asInstanceOf[ValDef].tpt.tpe <:< retType val projectsTree = Term.of(from) - val symbols = TypeTree.of[V].symbol.memberMethods.filter(isProjectField) + val symbols = TypeTree.of[V].symbol.fields.filter(isProjectField) val selects = symbols.map(Select(projectsTree, _).asExprOf[T]) '{ println(${Expr(retType.show)}); ${Varargs(selects)} } diff --git a/community-build/src/scala/dotty/communitybuild/Main.scala b/community-build/src/scala/dotty/communitybuild/Main.scala index 13c9ae573772..76f854d7f179 100644 --- a/community-build/src/scala/dotty/communitybuild/Main.scala +++ b/community-build/src/scala/dotty/communitybuild/Main.scala @@ -25,7 +25,7 @@ object Main: case "publish" :: name :: Nil => case "doc" :: "all" :: destStr :: Nil => val dest = Paths.get(destStr) - Seq("rm", "-rf", "destStr").! + Seq("rm", "-rf", destStr).! Files.createDirectory(dest) val (toRun, ignored) = allProjects.partition(_.docCommand != null) diff --git a/community-build/src/scala/dotty/communitybuild/projects.scala b/community-build/src/scala/dotty/communitybuild/projects.scala index 3cfad3839938..6cf13b5a2b3e 100644 --- a/community-build/src/scala/dotty/communitybuild/projects.scala +++ b/community-build/src/scala/dotty/communitybuild/projects.scala @@ -535,6 +535,6 @@ object projects: end projects -def allProjects = projects.fields.of[CommunityProject].sortBy(_.project) +def allProjects = projects.reflectedFields.of[CommunityProject].sortBy(_.project) lazy val projectMap = allProjects.map(p => p.project -> p).toMap