Skip to content
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

After run forge flatten command, then I run forge build, it shows: Multiple SPDX license identifiers found in source file. #3678

Closed
1 of 2 tasks
KittyFu307 opened this issue Nov 13, 2022 · 3 comments · Fixed by #6936
Labels
C-forge Command: forge Cmd-forge-flatten Command: forge flatten T-bug Type: bug

Comments

@KittyFu307
Copy link

Component

Forge

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.2.0 (c5791f5 2022-11-11T00:05:26.949466Z)

What command(s) is the bug in?

forge flatten

Operating System

macOS (Apple Silicon)

Describe the bug

Firstly I run the forge flatten --output src/a.sol src/Impl/b.sol to flat my contract.
Then I run forge build.
It will give me an error: ParserError: Multiple SPDX license identifiers found in source file. Use "AND" or "OR" to combine multiple licenses.
截屏2022-11-13 上午11 21 23

@KittyFu307 KittyFu307 added the T-bug Type: bug label Nov 13, 2022
@rkrasiuk rkrasiuk added C-forge Command: forge Cmd-forge-flatten Command: forge flatten labels Nov 14, 2022
@rkrasiuk
Copy link
Collaborator

@KittyFu307 where are your license identifiers situated within the file? as far as i remember, we strip them only if they located on the very first line

@KittyFu307
Copy link
Author

@KittyFu307 where are your license identifiers situated within the file? as far as i remember, we strip them only if they located on the very first line

It's in the first line of my file

@mattsse
Copy link
Member

mattsse commented Dec 21, 2022

could you perhaps provide a repro for this?
all files, without all the contract code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-forge Command: forge Cmd-forge-flatten Command: forge flatten T-bug Type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants