Skip to content

X-refs are not included in snippet export files #148

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
delphidabbler opened this issue Apr 12, 2025 · 1 comment
Closed

X-refs are not included in snippet export files #148

delphidabbler opened this issue Apr 12, 2025 · 1 comment
Assignees
Labels
rejected Won't implement or fix won't fix Either don't know how to fix or not prepared to fix

Comments

@delphidabbler
Copy link
Owner

When a snippet with "See Also" snippets is exported the export does not include the reference to those snippets.

The is provision in the export file format to include these snippets, under the codesnip-export/routines/routine/xref XML tag.

@delphidabbler delphidabbler self-assigned this Apr 12, 2025
@delphidabbler delphidabbler added bug Bug report considering Issue under consideration. May be accepted or rejected labels Apr 12, 2025
@github-project-automation github-project-automation bot moved this to Considering in CodeSnip Apr 12, 2025
@delphidabbler delphidabbler added accepted Accepted for implementation / fixing and removed considering Issue under consideration. May be accepted or rejected labels Apr 12, 2025
@delphidabbler delphidabbler moved this from Considering to Accepted in CodeSnip Apr 12, 2025
@delphidabbler delphidabbler added won't fix Either don't know how to fix or not prepared to fix and removed accepted Accepted for implementation / fixing bug Bug report labels Apr 15, 2025
@delphidabbler delphidabbler removed this from CodeSnip Apr 15, 2025
@delphidabbler
Copy link
Owner Author

Source code comments in the UCodeImportExport unit make clear that cross references are not written, by design:

procedure TCodeExporter.WriteSnippet(const ParentNode: IXMLNode;
  const Snippet: TSnippet);
var
  SnippetNode: IXMLNode; // new snippet node
begin
  ...
  // Add nodes for properties: (ignore category and xrefs)
  // description node is written even if empty (which it shouldn't be)
  fXMLDoc.CreateElement(
    SnippetNode,
    cDescriptionNode,
    TSnippetExtraHelper.BuildREMLMarkup(Snippet.Description)
  );
...

However, the export file specification document does allow for cross-references to be written to the XML file.

Following some research it seems that CodeSnip never allowed for xrefs to be exported, so I've concluded that the specification is in error.

Therefore I'm closing this issue as "won't fix" and opening another, related, issue re amending the export file specification. See issue #151.

@delphidabbler delphidabbler added the rejected Won't implement or fix label Apr 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rejected Won't implement or fix won't fix Either don't know how to fix or not prepared to fix
Projects
None yet
Development

No branches or pull requests

1 participant