question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

A bug related to the directive transform

See original GitHub issue

Before filling a bug

  • have you checked the faq for known issues.
  • have you checked existing issues

I use a transform directive as below to make a change on the generated C# code.

  - from: TrackedResourceTags.dictionary.cs
    where: $
    transform: $ =  $.replace(/null != property.Key && null != property.Value/g, 'null != property.Key');

The weird thing is it works in Linux but not in Windows.

If you want to reproduce the issue, you may add the directive above in https://github.com/Azure/azure-powershell/blob/generation/src/Databricks/README.md and then run autorest in the Databricks folder in a Windows machine.

I run autorest --debug in both Windows and Linux. The only different I can see from the log is that in Linux, we have something like below in the log while Windows not.

debug   | [13.02 s] Running text transform 'TrackedResourceTags.dictionary.cs/undefined' on mem:///267?generated%2Fapi%2FModels%2FApi20210401Preview%2FTrackedResourceTags.dictionary.cs

I tend to think the issue is in https://github.com/Azure/autorest/blob/main/packages/extensions/core/src/lib/plugins/transformer/transformer.ts#L28.

BTW, I use node 14.15.5 and autorest core version is 3.9.3.

Please provide as much information as you can. This would be:
- OpenAPI files having the issues
- Autorest command used

Expected behavior A clear and concise description of what you expected to happen.

Additional context Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
timotheeguerincommented, Dec 6, 2022
0reactions
dolaulicommented, Dec 7, 2022

@timotheeguerin Verified the issue is fixed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Build fails due to custom directive missing an SSR Transform
Seems like ClientOnly component does not exist yet in VitePress. Custom directive is missing corresponding SSR transform and will be ignored.
Read more >
[CDAP-17233] Wrangler throws a cryptic error message when ...
This directive does not exist. However, in Wrangler, there is no error message when you type it in the power mode. In pipelines...
Read more >
Binding Operational Directive 18-01 - CISA
A binding operational directive is a compulsory direction to federal, executive branch, departments and agencies for purposes of safeguarding ...
Read more >
Deep learning and computer vision will transform entomology
While there is a vast potential for deep learning of images and other data types to transform insect ecology and monitoring, applying deep ......
Read more >
Angular and nodeEmoji: custom directive for transfering text ...
I'm trying to understand the code of my predecessor and I'm looking for a bug related to the transformation of the text into...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found