Build docs update#350
Open
edwardalee wants to merge 3 commits intomasterfrom
Open
Conversation
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.
This fixes #348, enabling documentation to build. This includes removing dependencies on 1.
sun.security.util-- Internal JDK API that's no longer accessible due to the module system (JPMS)-- andcom.sun.javadoc-- The old Doclet API, removed entirely in JDK 13 (replaced byjdk.javadoc.doclet).A major part of the problem seems to have been related to accessors and the fact that https://accessors.org no longer has the information that these scripts assume a
@terraswarm/jsdocmodule at https://npmjs.org.This results in a large number of errors reported when generating the docs, but the process completes and generates docs for all the local actors.
Dialog with Claude Code leading to these changes:
Cursor
Let me look at how configure processes
build.xml.inand check what jsdoc-related configure logic exists.Now I can see the problem clearly. Let me look at how configure substitutions work in
build.xml.in.Now the picture is clear. Here's the diagnosis:
The problem:
build.xml.in(line 58) hardcodesjsdoc.hometonode_modules/@terraswarm/jsdoc, but jsdoc is actually installed atvendors/jsdoc(cloned by the Makefile's git clone step). Thenode_modules/@terraswarm/jsdocnpm package is never successfully installed because:jsdoc-installtarget checks if npmjs.org is reachable, and if that check fails, the install is silently skipped.@terraswarm/jsdocnpm package may no longer exist or be maintained.Meanwhile, the
doc/Makefilecorrectly clones jsdoc from GitHub intovendors/jsdoc/, and the filevendors/jsdoc/jsdoc.jsdoes exist on your system. Butbuild.xmlnever looks there -- it tries to runnode_modules/@terraswarm/jsdoc/jsdoc.jswhich doesn't exist.The fix: Change
jsdoc.homeinbuild.xml.infromnode_modules/@terraswarm/jsdoctovendors/jsdoc, and apply the same change to the already-generatedbuild.xmlso you don't need to re-run configure.Summary of the issue and fix:
build.xml.inline 58 hadjsdoc.homeset tonode_modules/@terraswarm/jsdoc, expecting jsdoc to be installed vianpm install @terraswarm/jsdoc.doc/Makefileinstalls jsdoc viagit cloneintovendors/jsdoc/-- and that's what's actually present on your system (vendors/jsdoc/jsdoc.jsexists).node_modules/@terraswarm/jsdoc/jsdoc.jswas never created.jsdoc.homewas hardcoded (not a@VARIABLE@placeholder), so configure never touched it.I changed
jsdoc.homefromnode_modules/@terraswarm/jsdoctovendors/jsdocin bothbuild.xml.in(the template) andbuild.xml(the generated file). Trycd doc; make docsagain to see if the jsdoc step now works.User
OK, the next error is below. Suggestions?
Cursor
The jsdoc path fix worked, but now jsdoc's npm dependencies aren't installed. The
vendors/jsdocdirectory was git-cloned but never hadnpm installrun in it. Let me check what's there.As expected --
node_modulesis missing insidevendors/jsdoc. You just need to install the dependencies:That will fetch
requizzleand all the other dependencies jsdoc needs. Then re-runcd doc; make docs.User
Can this command somehow be added to the makefile?
Cursor
Good idea. Let me look at how the Makefile currently handles the jsdoc setup to find the right place to add it.
The right place is right after the git clone (line 820), before the ant invocation. If the clone just happened, or if
node_modulesis missing, we should runnpm install.Done. I added a step (lines 822-825) that checks if
vendors/jsdoc/node_modulesexists, and if not, runsnpm installinsidevendors/jsdoc. It follows the same pattern as the existing guards -- the leading-means make won't abort if the command fails, and it only runs whennode_modulesis missing, so it's a no-op on subsequent builds.User
I now get the following message and am wondering why it is checking www.npmjs.org and whether we can remove this check.
Cursor
Let me trace through the dependency chain to understand what this check is guarding.
The whole
npmjs.orgcheck exists solely to supportnpm install @terraswarm/jsdocandnpm update @terraswarm/jsdocintonode_modules/-- the old installation approach we've already replaced. The dependency chain is:jsdoc→jsdoc-update→jsdoc-install→-check-if-npmjs-org-is-up(which pingshttps://www.npmjs.org)Since the Makefile now handles cloning into
vendors/jsdocand runningnpm installthere, these ant targets are dead code. The fix is to remove thejsdoc-updatedependency from thejsdoctarget.Done. I removed
jsdoc-updatefrom thejsdoctarget'sdependsin bothbuild.xml.inandbuild.xml. This eliminates the entire chain of npm/network checks (jsdoc-update→jsdoc-install→-check-if-npmjs-org-is-up→ npmjs.org ping). Thejsdoc-install,jsdoc-update, and related check targets are now orphaned but harmless -- they won't run unless someone explicitly invokes them viaant jsdoc-installorant jsdoc-update. You could clean them out later if you want, but they won't cause any trouble.User
The next error:
Cursor
The first error is a plugin path issue --
doc/jsdoc/jsdoc.jsonlikely references the oldnode_modules/@terraswarm/jsdocpath. Let me check.There it is -- the plugin path on line 2 still references
node_modules/@terraswarm/jsdoc. Let me check if the plugin exists in thevendors/jsdoclocation.That fixes the first error. The other three errors are different in nature -- they're JavaScript parse failures, not path issues:
Unexpected token eachinhttpClient.jsandprocess.js-- These files likely usefor each...insyntax, a SpiderMonkey/Nashorn extension that was never standard JavaScript. Modern jsdoc (using a modern JS parser) can't parse it.Unexpected token =inFixedPlugin.jsx-- This is a JSX/React file with class property syntax that jsdoc doesn't understand without additional configuration.These are pre-existing issues with old non-standard JS syntax in the codebase, not something caused by the configuration. They'll produce
ERRORlog lines but shouldn't prevent jsdoc from generating docs for the other files. Does the build actually fail on these, or does it continue past them?User
No doc files are generated. The next error:
Cursor
This is a Node.js v22 compatibility issue with the old jsdoc code. Let me look at the relevant code in
publish.js.Found it. The bug is a Node.js version compatibility issue in
vendors/jsdoc/lib/jsdoc/fs.js. Here's what happens:exports.copyFileSync(inFile, outDir, fileName)that correctly handles copying a file into a directory.fsmodule ontoexports-- which overwrites the customcopyFileSyncwith Node'sfs.copyFileSync.fs.copyFileSync(src, dest)expectsdestto be a file path, not a directory, causing the EISDIR error.In older Node.js versions
fs.copyFileSyncdidn't exist, so the overwrite never happened. With Node v22, it does. The fix is to move the Nodefsproperty copy to before the custom definitions, so the custom ones take precedence.Now remove the old copy at the end of the file since it's been moved up.
Now the Node built-in
fsmembers are copied first, and then the customls,toDir,mkPath, andcopyFileSyncdefinitions override any conflicting ones. This restores the intended behavior where jsdoc'scopyFileSync(inFile, outDir)correctly constructs the output file path from the directory.There's also a secondary issue: line 104 uses
new Buffer(...)which is deprecated in modern Node. If you hit that next, it's a quick fix toBuffer.alloc(...), but let's see if this gets you past the current error first.User
The next error:
Cursor
This is a bug in jsdoc's type expression parser -- it can't handle the complex type syntax
[ 'array' ].<{'horizontal': 'number', 'vertical': 'number'}>. This is in the template rendering phase, so it crashes the entire output generation. Let me look at the code.Now I understand the full chain:
parseTypecatches the catharsis parse error, logs it vialogger.error(), and continueslogger.error()triggers a one-time event that setsshouldExitWithError = true<exec>sees the non-zero exit and reports BUILD FAILEDSo docs are generated but the non-zero exit kills the build. The simplest fix is to add
failonerror="false"to the jsdoc exec in the ant target, since jsdoc parse errors in individual files shouldn't prevent the rest of the docs from being built.Added
failonerror="false"to the jsdoc exec in both files. This way jsdoc will still log errors about unparseable type expressions or non-standard JavaScript syntax, but the build will continue past them. The docs for all successfully parsed files will still be generated indoc/codeDoc/js/index.html.User
Next error:
Cursor
These are two separate issues, both caused by running on a modern JDK (likely JDK 17+):
sun.security.util-- Internal JDK API that's no longer accessible due to the module system (JPMS).com.sun.javadoc-- The old Doclet API, removed entirely in JDK 13 (replaced byjdk.javadoc.doclet).These aren't doc-generation errors per se -- they're compilation errors triggered because the
docstarget depends on compiling these files first. The fix is to exclude them from the javadoc compilation path since they can't compile on modern JDKs.Let me look at how the build handles this.
These are two JDK 17 compatibility issues. On JDK 17:
sun.security.utilis blocked by the Java module system (JPMS)com.sun.javadocwas entirely removed in JDK 13 --PtDocletis fundamentally broken on JDK 17Let me check what configure sets for the doclets directory.
These are JDK 17 incompatibilities. Two fixes needed:
ptolemy.copernicus.appletuses internal JDK APIs -- exclude it from the javadoc package listdoc.doclets.PtDocletuses the oldcom.sun.javadocAPI (removed in JDK 13) -- PtDoclet fundamentally cannot work on JDK 17, so the PtDoclet-dependent targets need to be disabledAll the javadoc commands have
-prefixes so make continues past errors, but the PtDoclet failure meanscodeDoc/ptolemy/actor/lib/Ramp.xmlnever gets created, which cascades toRampIdx.xmlwhich does NOT have a-prefix and will halt the build.Now for the critical fix -- the PtDoclet-dependent targets in
FULL_DOCSwill never produce output on JDK 17, and theRampIdx.xmltarget that depends on them will halt the build. I'll remove them fromFULL_DOCS:Here's a summary of the three changes to
doc/makefile:Excluded
ptolemy.copernicus.appletfromCOPERNICUSPACKAGES-- it usessun.security.util.ManifestDigester, an internal API that's blocked by the Java module system on JDK 9+.Removed
doc.docletsfromALLPACKAGES-- thePtDocletand related classes usecom.sun.javadoc.*, which was entirely removed in JDK 13.Removed
codeDoc/ptolemy/actor/lib/Ramp.xmlandRampIdx.xmlfromFULL_DOCS-- these targets depend on PtDoclet, which can't work on JDK 17. Without this change, theRampIdx.xmlrecipe (which lacks a-error-ignore prefix) would halt the build.The
codeDoc/tree.html(javadoc) andcodeDoc/js/index.html(jsdoc) will still be generated. The PtDoclet-based actor documentation index (Ramp.xml,RampIdx.xml) is lost, but that's unavoidable without porting PtDoclet to the newjdk.javadoc.docletAPI.User
The build.xml file is generated by configure, so I think it's changes should go into @build.xml.in
Cursor
You're right. The changes I made earlier to
build.xml(thejsdoc.homepath, removing thejsdoc-updatedependency, and addingfailonerror="false") should be inbuild.xml.in-- which they already are. Butbuild.xmlshould be regenerated frombuild.xml.inby re-running configure, rather than being edited directly. The direct edits tobuild.xmlwere just to avoid requiring you to re-run configure immediately, but you're correct that the canonical source isbuild.xml.in.To make
build.xmlconsistent, you can re-run configure:That will regenerate
build.xmlfrom the updatedbuild.xml.in, picking up all three changes (thevendors/jsdocpath, the removedjsdoc-updatedependency, and thefailonerror="false").User
What would it take to port PtDoclet to the new jdk.javadoc.doclet API? Is this a big task?
Cursor
Let me look at the existing PtDoclet to assess the scope.
Now I have a complete picture. Here's the assessment:
It's a moderate task -- probably a few hours of work, not days. PtDoclet is a focused, single-purpose doclet (~485 lines) that does one thing: iterate over classes, extract javadoc comments/tags/fields, and write XML files. It doesn't do any complex rendering or cross-referencing.
Here's the mapping from the old API to the new
jdk.javadoc.docletAPI:com.sun.javadoc)jdk.javadoc.doclet/javax.lang.model)start(RootDoc)Docletinterface withinit(),run(),getSupportedOptions()etc.RootDoc.classes()DocletEnvironment.getSpecifiedElements()+ElementFilterClassDocTypeElementFieldDocVariableElementClassDoc.subclassOf(other)Types.isSubtype()ClassDoc.fields()ElementFilter.fieldsIn(element.getEnclosedElements())Tag/SeeTagDocCommentTree+DocTreeVisitor(this is the trickiest part)ProgramElementDoc.tags("foo")DocTrees.getDocCommentTree()then walk the treeDoc.inlineTags()DocCommentTree.getBody()elementsSeeTag.referencedClass()etc.ReferenceTree+ manual resolutionoptionLength()getSupportedOptions()returningSet<Doclet.Option>root.options()(raw string arrays)Doclet.Optionwithprocess()callbacksWhat makes it manageable:
PtDocletonly uses ~6 types from the old API (RootDoc,ClassDoc,FieldDoc,ProgramElementDoc,Tag,SeeTag).PtIndexerhas zero dependency on the old API -- it's pure Java I/O and data structures, so it needs no changes._writeDoc,_relativizePath,_getOutputDirectory) is all string manipulation that stays the same.The hardest part is the inline tag processing in
_inlineTagCommentText()(lines 185-239). The old API gave you a flat array ofTagandSeeTagobjects. The new API usesDocCommentTreewhich is a tree ofDocTreenodes that you walk with a visitor. The{@link ...}handling in particular requires resolving references manually viaDocTreesrather than getting pre-resolvedreferencedClass()/referencedMember()fromSeeTag.Rough estimate: 2-4 hours for someone familiar with the new Doclet API, maybe a full day if learning it from scratch. Would you like me to do the port?
User
Yes, please do the port.
Cursor
Let me first check how the doclet is invoked and what the build infrastructure looks like for compilation.
Now let me check what the new Doclet API looks like to make sure I get the imports right.
Now I have a thorough understanding of the old code. Let me write the ported version.
Now let me re-enable the PtDoclet targets in the Makefile and fix the build infrastructure.
Now update the
javadoc.docletstarget inbuild.xml.in-- on JDK 9+ there's notools.jar(the doclet API is injdk.javadocmodule), so we remove that classpath entry and update the message.Also update the
javadoc.actortarget which invokes PtDoclet -- the new API requires the doclet path to include the JDK modules, and we should remove thetools.jarreference there too.Also fix the
javadoc.basetarget which usesRatingTaglet-- let me check if that exists and also referencestools.jar.The remaining
tools.jarreferences are in other targets (doccheck, ojdcheck, javadoc.base, actorIndex). Those are separate concerns -- they won't break the PtDoclet port. Let me now test that the new PtDoclet compiles.Compiles cleanly -- only a pre-existing deprecation warning in
PtIndexer.java(not our code). Let me also verify it can be loaded as a doclet by running a quick test.Let me verify the XML output looks correct.
The port is complete and verified. Here's a summary:
PtDoclet ported successfully. It compiles, runs, and produces correct XML output on JDK 17.
What changed:
doc/doclets/PtDoclet.java-- Complete rewrite fromcom.sun.javadoctojdk.javadoc.doclet:Docletinterface (init(),run(),getName(),getSupportedOptions(),getSupportedSourceVersion())javax.lang.model(TypeElement,VariableElement,Types.isSubtype()) instead ofClassDoc,FieldDoc,ClassDoc.subclassOf()com.sun.source.doctree(DocCommentTree,LinkTree,TextTree,UnknownBlockTagTree) instead ofTag/SeeTag-doption is handled viaDoclet.Optioninstead ofoptionLength()build.xml.in-- Removedtools.jarfrom classpath injavadoc.docletsandjavadoc.actortargets (not needed on JDK 9+)doc/makefile-- Re-enableddoc.docletsinALLPACKAGESand restoredRamp.xml/RampIdx.xmlinFULL_DOCSTest output confirms the doclet correctly:
NamedObjsubclasses inptolemy.kernel.utilallNamedObjs.txtandPtIndexer.serUser
This change seems to correctly build the Java class documentation, but it does not generate the XML Actor documentation file that used to get constructed and is used by the DocViewer class. The XML file uses the DocML schema, as defined in the DocManager class. Can we modify it to restore building the XML file?
Cursor
Let me look at the DocML schema and how the old PtDoclet generated actor documentation to understand what's expected.
Now let me look at the XML file that the old PtDoclet used to generate for a real actor, and compare it with what the new PtDoclet generates.
The XML actor documentation files are being generated correctly. The
Ramp.xmlfile has the proper DocML format with<doc>,<description>,<author>,<version>,<since>, ratings, and<property>elements for ports/parameters.Let me check what the user might be seeing differently. Perhaps the issue is with the
make docsflow - maybe the Makefile invocation uses different flags.The Makefile target doesn't pass
-docletpath-- the old API loaded the doclet from the classpath automatically, but the new API needs it explicitly. Let me check if theCLASSPATHvariable includes$PTII(i.e.,.).Let me test the exact flow that
make docswould use to understand why it might fail.That's the problem. On JDK 17, javadoc no longer searches the
CLASSPATHenvironment variable for doclet classes -- it requires an explicit-docletpath. The Makefile setsCLASSPATHas an env var but that's not enough for the new javadoc.Good -- the key fix is adding
-docletpathto the Makefile'sPTDOCLETvariable. On JDK 17, theCLASSPATHenv var isn't used to find doclet classes.Let me verify this works end-to-end with the Makefile's actual invocation pattern.
The issue is argument ordering -- on JDK 17,
-docletmust come before-dso javadoc knows to route-dto the custom doclet. The Makefile currently putsPTDOCFLAGS(containing-d) beforePTDOCLET(containing-doclet). I need to swap the order in the Makefile, or merge the flags intoPTDOCLET.I need to swap
PTDOCFLAGSandPTDOCLETin all the targets that use them, so-docletcomes before-d. Let me find all occurrences.The fix is argument ordering. On JDK 17,
-docletmust come before-dso javadoc knows to route the-doption to the custom doclet. I need to swap the order in all PtDoclet invocations.Now fix the sub-targets (Bcvtb, CapeCode, HyVisual, Viptos, VisualSense) where
-dis inline before$(PTDOCLET).Now let me also make sure the PtDoclet is compiled before it's used. The Makefile doesn't have a dependency for compiling the doclet. Let me check whether the
docstarget compiles things first.Good.
FULL_DOCSincludescodeDoc/ptolemy/actor/lib/Ramp.xml, which triggers the PtDoclet. But it doesn't ensure the doclet is compiled first. Let me add a compilation dependency.I need to add a dependency to compile PtDoclet before the Ramp.xml target. Let me add a target for that.
Now let me verify the full flow works. First, let me clean out the previous test output and try the Makefile-style invocation.
The DocML XML files are generated correctly. Let me count how many XML files were generated.
155 actor documentation XML files generated. The fix involves two changes to
doc/makefile:Added
-docletpath $(ROOT)toPTDOCLET-- On JDK 9+, javadoc no longer searches theCLASSPATHenvironment variable for doclet classes; it requires an explicit-docletpathoption.Swapped the order of
$(PTDOCLET)and$(PTDOCFLAGS)/-din all PtDoclet invocation targets -- On JDK 17,-docletmust appear before-don the command line so javadoc knows to route the-doption to the custom doclet rather than trying to handle it as a standard doclet option (which doesn't exist with a custom doclet).Added a compilation dependency -- The
codeDoc/ptolemy/actor/lib/Ramp.xmltarget now depends on$(ROOT)/doc/doclets/PtDoclet.class, which has a rule to compile the doclet from source, ensuring the doclet is built before it's invoked.These changes were applied to all six PtDoclet targets (the main one plus Bcvtb, CapeCode, HyVisual, Viptos, and VisualSense variants).
User
I'm running
make docsin the doc directory, and it still does not generate the XML files. I get a number of errors, the first few of which are:Cursor
Those errors are from the JSDoc (JavaScript documentation) step, not from the PtDoclet (Java XML documentation) step. The JSDoc errors are expected -- they come from old JavaScript files using non-standard syntax -- and were already handled by adding
failonerror="false"to the JSDoc ant target in our earlier work.The XML files not being generated is a separate issue. Let me check what's actually happening when
make docsruns the PtDoclet target.The Makefile target looks correct. Let me check if
codeDoc/ptolemy/actor/lib/Ramp.xmlalready exists (from my earlier test), which would cause make to skip that target.OK, so the file doesn't exist. Let me try running just the
ptdoctarget to see the actual error.Found it. The issue is the
-docletpath. The$(ROOT)variable in this Makefile is..(relative to thedocdirectory), but the javadoc command already doescd ..before running. So-docletpath ..resolves to$PTII/..which is the wrong directory. The docletpath needs to be.since javadoc runs from$PTII.Good, the class file exists. The only problem is the path. Since the javadoc command runs inside
(cd ..; ...), it's already in$PTII, so the docletpath should be.not$(ROOT)(which expands to..).Now let me test this.
The PtDoclet ran successfully (the
ClassNotFoundException: antlr.CommonASTis just a classpath issue for one specific package, not a PtDoclet failure). Let me verify the XML files were generated.It's working now. 1,772 DocML XML files were generated across all packages.
The problem was that the Makefile's
PTDOCLETvariable used-docletpath $(ROOT), where$(ROOT)expands to..(relative to thedocdirectory). But the javadoc command runs inside(cd ..; ...), which puts it in$PTII. So-docletpath ..was looking for the doclet class one directory above$PTII-- the wrong location. Changing it to-docletpath .makes it finddoc/doclets/PtDoclet.classcorrectly from$PTII.User
Can you update the JavaScript files that use the non-standard syntax to use standard syntax instead?
Cursor
Let me start by examining the files with non-standard syntax.
Now let me look at the JSX files that have "Unexpected token =" errors.
Let me check if there are more files using the
for eachnon-standard syntax.Good. There are two categories of non-standard syntax:
for each...in(Mozilla/Nashorn extension) inhttpClient.jsandprocess.js-- these can be fixed by replacing with standardfor...ofloops. Thefor each (var x in collection)iterates over values, which is equivalent tofor (var x of collection)in standard JS.Class field declarations (
method = () => {...}) in the 5 JSX files -- these use ES2022 class fields syntax. However, even if we fix this, JSDoc still can't parse JSX template syntax (<div>,<>, etc.), so these files will always fail JSDoc parsing regardless. I'll convert them anyway for consistency.Let me start with the two
.jsfiles.Now for the JSX files. The issue is class field arrow function syntax (
methodName = () => {...}). I'll convert these to standard method declarations with constructor binding.Starting with
FixedPlugin.jsx:Now
AdminNavbar.jsx:Now
RTLNavbar.jsx(same structure):Now
Sidebar.jsx(only one class field:linkOnClick):Finally,
Admin.jsx(hastoggleSidebar,getRoutes,handleBgClick,getBrandText):All 7 files have been updated. Here's a summary of the changes:
JavaScript files (Nashorn
for each...in→ standard iterator pattern):ptolemy/actor/lib/jjs/modules/httpClient/httpClient.js: Replacedfor each (var name in headersMap.names())with an explicititerator()/hasNext()/next()loop. These files use Java interop via Nashorn, so the Java iterator API is the appropriate standard replacement (a plainfor...ofwon't work on Java collections in Nashorn).ptolemy/actor/lib/jjs/modules/process/process.js: Same pattern -- replacedfor each(var javaVariable in System.env.entrySet())with an explicit Java iterator loop.JSX files (ES2022 class fields → constructor-bound methods):
FixedPlugin.jsx: ConvertedhandleClickandactivateModefrom class field arrow functions to standard methods withbind(this)in the constructor.AdminNavbar.jsx: ConvertedupdateColor,toggleCollapse, andtoggleModalSearch.RTLNavbar.jsx: ConvertedupdateColor,toggleCollapse, andtoggleModalSearch.Sidebar.jsx: ConvertedlinkOnClickand also fixed the pre-existingthis.activeRoute.bind(this)call (which wasn't assigning the result back).Admin.jsx: ConvertedtoggleSidebar,getRoutes,handleBgClick, andgetBrandText.Note that the JSX files will still produce JSDoc parse errors because JSDoc can't parse JSX template syntax (
<div>,<>, etc.) -- that's a fundamental limitation. But the=token errors are now eliminated.User
Where are these JSX files? I do not see them in the tree.
Cursor
Let me check if these files actually exist on disk.
The files do exist on disk. They're deep in the tree at:
If you're not seeing them in the IDE file tree, it may be because that part of the tree is collapsed, or the
org/terraswarm/accessor/accessors/directory is quite deeply nested. Try expandingorg→terraswarm→accessor→accessors→web→userInterface→dashboard→srcin the sidebar.User
Are these generated files? git and cursor seem unaware of them. There are no diffs showing up from your changes.
Cursor
Yes, these are effectively external/generated files. The entire
org/terraswarm/accessor/accessors/directory is gitignored byorg/terraswarm/accessor/.gitignore(which has/accessorsas an ignore rule). That means these files are pulled in from somewhere else (likely cloned from a separate accessors repository) and are not tracked by this repo's git.Since they're not under version control here, my edits to them are essentially throwaway -- they'll be overwritten the next time the accessors are fetched. The changes to those JSX files should instead be made in whatever upstream repository they come from, if the errors bother you.
The meaningful changes that are tracked by git are the two
.jsfiles:ptolemy/actor/lib/jjs/modules/httpClient/httpClient.jsptolemy/actor/lib/jjs/modules/process/process.jsLet me verify those diffs are visible.
Those two
.jsfiles are the only tracked changes. The JSX files underorg/terraswarm/accessor/accessors/are gitignored -- they come from an external accessors repository and aren't part of this repo. Any fixes to those would need to be made upstream.User
Can you figure out how these files got here? I have not cloned any other repo into this one and they do not seem to be in a submodule.
Cursor
Let me check how this clone got triggered.
That explains it. The
accessorsdirectory is cloned automatically by the./configurescript. Here's what happens:./configure, it checked fororg/terraswarm/accessor/accessors/git clone https://github.com/icyphy/accessorsinsideorg/terraswarm/accessor/(seeconfigure.inline 1346-1350)org/terraswarm/accessor/accessors/with its own.gitdirectory.gitignoreatorg/terraswarm/accessor/.gitignorecontains/accessorsto exclude this entire clone from the ptII repo's trackingSo it's not a submodule -- it's just a separate git repo cloned into place by
configureas a build dependency. The JSX files belong to the icyphy/accessors repository, and any fixes to them would need to be committed there. My edits to those files are local-only and won't persist.