# Sway-lib-core warnings during forc build

**URL:** <https://forum.fuel.network/t/sway-lib-core-warnings-during-forc-build/2652>\
**Category:** Sway\
**Created:** [May 19, 2023, 1:47pm UTC](https://forum.fuel.network/t/sway-lib-core-warnings-during-forc-build/2652 "2023-05-19T13:47:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fuel](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/fuel/32/1677_2.png) [@fuel](https://forum.fuel.network/u/fuel)\
**Post date:** [May 19, 2023, 1:47pm UTC](https://forum.fuel.network/t/sway-lib-core-warnings-during-forc-build/2652/1 "2023-05-19T13:47:12Z")

</div>

Hi guys, I’m using new forc v0.39 and I have these warnings during the build using `forc build`

> **Predicate build output**
>
> ```auto
> warning
> --> /Users/alexey/.forc/git/checkouts/std-9be0d6062747ea7/7a095280e7e1c0bfbbfc201867896e720aab7209/sway-lib-core/src/ops.sw:485:21
> |
> 483 | 
> 484 | fn lsh(self, other: u64) -> Self {
> 485 | __lsh(self, other)
> | ----- This cast, from integer type of width sixty four to integer type of width thirty two, will lose precision.
> 486 | }
> 487 | fn rsh(self, other: u64) -> Self {
> |
> ____
> 
> warning
> --> /Users/alexey/.forc/git/checkouts/std-9be0d6062747ea7/7a095280e7e1c0bfbbfc201867896e720aab7209/sway-lib-core/src/ops.sw:488:21
> |
> 486 | 
> 487 | fn rsh(self, other: u64) -> Self {
> 488 | __rsh(self, other)
> | ----- This cast, from integer type of width sixty four to integer type of width thirty two, will lose precision.
> 489 | }
> 490 | }
> |
> ____
> 
> warning
> --> /Users/alexey/.forc/git/checkouts/std-9be0d6062747ea7/7a095280e7e1c0bfbbfc201867896e720aab7209/sway-lib-core/src/ops.sw:494:21
> |
> 492 | 
> 493 | fn lsh(self, other: u64) -> Self {
> 494 | __lsh(self, other)
> | ----- This cast, from integer type of width sixty four to integer type of width sixteen, will lose precision.
> 495 | }
> 496 | fn rsh(self, other: u64) -> Self {
> |
> ____
> 
> warning
> --> /Users/alexey/.forc/git/checkouts/std-9be0d6062747ea7/7a095280e7e1c0bfbbfc201867896e720aab7209/sway-lib-core/src/ops.sw:497:21
> |
> 495 | 
> 496 | fn rsh(self, other: u64) -> Self {
> 497 | __rsh(self, other)
> | ----- This cast, from integer type of width sixty four to integer type of width sixteen, will lose precision.
> 498 | }
> 499 | }
> |
> ____
> 
> warning
> --> /Users/alexey/.forc/git/checkouts/std-9be0d6062747ea7/7a095280e7e1c0bfbbfc201867896e720aab7209/sway-lib-core/src/ops.sw:503:21
> |
> 501 | 
> 502 | fn lsh(self, other: u64) -> Self {
> 503 | __lsh(self, other)
> | ----- This cast, from integer type of width sixty four to integer type of width eight, will lose precision.
> 504 | }
> 505 | fn rsh(self, other: u64) -> Self {
> |
> ____
> 
> warning
> --> /Users/alexey/.forc/git/checkouts/std-9be0d6062747ea7/7a095280e7e1c0bfbbfc201867896e720aab7209/sway-lib-core/src/ops.sw:506:21
> |
> 504 | 
> 505 | fn rsh(self, other: u64) -> Self {
> 506 | __rsh(self, other)
> | ----- This cast, from integer type of width sixty four to integer type of width eight, will lose precision.
> 507 | }
> 508 | }
> |
> ____
> 
> warning
> --> /Users/alexey/.forc/git/checkouts/std-9be0d6062747ea7/7a095280e7e1c0bfbbfc201867896e720aab7209/sway-lib-core/src/lib.sw:0:1
> |
> 0 | library;
> | - Module privacy rules will soon change to make modules private by default.
> You can enable the new behavior with the --experimental-private-modules flag, which will become the default behavior in a later release.
> More details are available in the related RFC: https://github.com/FuelLabs/sway-rfcs/blob/master/rfcs/0008-private-modules.md
> 1 | 
> 2 | pub mod primitives;
> |
> ____
> 
> Compiled library "core" with 7 warnings.
> Compiling library std (git+https://github.com/fuellabs/sway?tag=v0.39.0#7a095280e7e1c0bfbbfc201867896e720aab7209)
> warning
> --> /Users/alexey/.forc/git/checkouts/std-9be0d6062747ea7/7a095280e7e1c0bfbbfc201867896e720aab7209/sway-lib-std/src/lib.sw:0:1
> |
> 0 | library;
> | - Module privacy rules will soon change to make modules private by default.
> You can enable the new behavior with the --experimental-private-modules flag, which will become the default behavior in a later release.
> More details are available in the related RFC: https://github.com/FuelLabs/sway-rfcs/blob/master/rfcs/0008-private-modules.md
> 1 | 
> 2 | pub mod error_signals;
> |
> ____
> 
> Compiled library "std" with 1 warning.
> Compiling predicate limit-order-predicate (/Users/alexey/projects/fuel/ethglobal-predicate)
> warning
> --> /Users/alexey/projects/fuel/ethglobal-predicate/src/main.sw:0:1
> |
> 0 | predicate;
> | - Module privacy rules will soon change to make modules private by default.
> You can enable the new behavior with the --experimental-private-modules flag, which will become the default behavior in a later release.
> More details are available in the related RFC: https://github.com/FuelLabs/sway-rfcs/blob/master/rfcs/0008-private-modules.md
> 1 | mod utils;
> |
> ____
> 
> Compiled predicate "limit-order-predicate" with 1 warning.
> Finished debug in 1.173160708s
> predicate limit-order-predicate
> Bytecode size: 9692 bytes
> Predicate root: 0x36c7cc4eb4be98901b9755f57e0c0a1daa56529d7e954a694f5d1e6c50a301f6
> ^^/p/f/ethglobal-predicate >>> rm -rf out target && forc build && cargo test (*master+14) 13:50:24 
> WARNING! unused manifest key: project.target
> WARNING! unused manifest key: project.target
> WARNING! unused manifest key: project.target
> WARNING! unused manifest key: project.target
> WARNING! unused manifest key: project.target
> WARNING! unused manifest key: project.target
> WARNING! unused manifest key: constants
> WARNING! unused manifest key: constants
> Compiling library core (/Users/alexey/.forc/git/checkouts/std-9be0d6062747ea7/7a095280e7e1c0bfbbfc201867896e720aab7209/sway-lib-core)
> warning
> --> /Users/alexey/.forc/git/checkouts/std-9be0d6062747ea7/7a095280e7e1c0bfbbfc201867896e720aab7209/sway-lib-core/src/ops.sw:485:21
> |
> 483 | 
> 484 | fn lsh(self, other: u64) -> Self {
> 485 | __lsh(self, other)
> | ----- This cast, from integer type of width sixty four to integer type of width thirty two, will lose precision.
> 486 | }
> 487 | fn rsh(self, other: u64) -> Self {
> |
> ____
> 
> warning
> --> /Users/alexey/.forc/git/checkouts/std-9be0d6062747ea7/7a095280e7e1c0bfbbfc201867896e720aab7209/sway-lib-core/src/ops.sw:488:21
> |
> 486 | 
> 487 | fn rsh(self, other: u64) -> Self {
> 488 | __rsh(self, other)
> | ----- This cast, from integer type of width sixty four to integer type of width thirty two, will lose precision.
> 489 | }
> 490 | }
> |
> ____
> 
> warning
> --> /Users/alexey/.forc/git/checkouts/std-9be0d6062747ea7/7a095280e7e1c0bfbbfc201867896e720aab7209/sway-lib-core/src/ops.sw:494:21
> |
> 492 | 
> 493 | fn lsh(self, other: u64) -> Self {
> 494 | __lsh(self, other)
> | ----- This cast, from integer type of width sixty four to integer type of width sixteen, will lose precision.
> 495 | }
> 496 | fn rsh(self, other: u64) -> Self {
> |
> ____
> 
> warning
> --> /Users/alexey/.forc/git/checkouts/std-9be0d6062747ea7/7a095280e7e1c0bfbbfc201867896e720aab7209/sway-lib-core/src/ops.sw:497:21
> |
> 495 | 
> 496 | fn rsh(self, other: u64) -> Self {
> 497 | __rsh(self, other)
> | ----- This cast, from integer type of width sixty four to integer type of width sixteen, will lose precision.
> 498 | }
> 499 | }
> |
> ____
> 
> warning
> --> /Users/alexey/.forc/git/checkouts/std-9be0d6062747ea7/7a095280e7e1c0bfbbfc201867896e720aab7209/sway-lib-core/src/ops.sw:503:21
> |
> 501 | 
> 502 | fn lsh(self, other: u64) -> Self {
> 503 | __lsh(self, other)
> | ----- This cast, from integer type of width sixty four to integer type of width eight, will lose precision.
> 504 | }
> 505 | fn rsh(self, other: u64) -> Self {
> |
> ____
> 
> warning
> --> /Users/alexey/.forc/git/checkouts/std-9be0d6062747ea7/7a095280e7e1c0bfbbfc201867896e720aab7209/sway-lib-core/src/ops.sw:506:21
> |
> 504 | 
> 505 | fn rsh(self, other: u64) -> Self {
> 506 | __rsh(self, other)
> | ----- This cast, from integer type of width sixty four to integer type of width eight, will lose precision.
> 507 | }
> 508 | }
> |
> ____
> 
> warning
> --> /Users/alexey/.forc/git/checkouts/std-9be0d6062747ea7/7a095280e7e1c0bfbbfc201867896e720aab7209/sway-lib-core/src/lib.sw:0:1
> |
> 0 | library;
> | - Module privacy rules will soon change to make modules private by default.
> You can enable the new behavior with the --experimental-private-modules flag, which will become the default behavior in a later release.
> More details are available in the related RFC: https://github.com/FuelLabs/sway-rfcs/blob/master/rfcs/0008-private-modules.md
> 1 | 
> 2 | pub mod primitives;
> |
> ____
> 
> Compiled library "core" with 7 warnings.
> Compiling library std (git+https://github.com/fuellabs/sway?tag=v0.39.0#7a095280e7e1c0bfbbfc201867896e720aab7209)
> warning
> --> /Users/alexey/.forc/git/checkouts/std-9be0d6062747ea7/7a095280e7e1c0bfbbfc201867896e720aab7209/sway-lib-std/src/lib.sw:0:1
> |
> 0 | library;
> | - Module privacy rules will soon change to make modules private by default.
> You can enable the new behavior with the --experimental-private-modules flag, which will become the default behavior in a later release.
> More details are available in the related RFC: https://github.com/FuelLabs/sway-rfcs/blob/master/rfcs/0008-private-modules.md
> 1 | 
> 2 | pub mod error_signals;
> |
> ____
> 
> Compiled library "std" with 1 warning.
> Compiling predicate limit-order-predicate (/Users/alexey/projects/fuel/ethglobal-predicate)
> warning
> --> /Users/alexey/projects/fuel/ethglobal-predicate/src/main.sw:0:1
> |
> 0 | predicate;
> | - Module privacy rules will soon change to make modules private by default.
> You can enable the new behavior with the --experimental-private-modules flag, which will become the default behavior in a later release.
> More details are available in the related RFC: https://github.com/FuelLabs/sway-rfcs/blob/master/rfcs/0008-private-modules.md
> 1 | mod utils;
> |
> ____
> 
> Compiled predicate "limit-order-predicate" with 1 warning.
> 
> ```

Also if I follow the suggestion of warnings to use this command to build `forc build --experimental-private-modules `, I will have these warnings:

> **Warnings during \`forc build --experimental-private-modules \`command**
>
> ```auto
> WARNING! unused manifest key: project.target
> WARNING! unused manifest key: project.target
> WARNING! unused manifest key: project.target
> WARNING! unused manifest key: project.target
> WARNING! unused manifest key: project.target
> WARNING! unused manifest key: project.target
> WARNING! unused manifest key: constants
> WARNING! unused manifest key: constants
> Compiling library core (/Users/alexey/.forc/git/checkouts/std-9be0d6062747ea7/7a095280e7e1c0bfbbfc201867896e720aab7209/sway-lib-core)
> warning
> --> /Users/alexey/.forc/git/checkouts/std-9be0d6062747ea7/7a095280e7e1c0bfbbfc201867896e720aab7209/sway-lib-core/src/ops.sw:485:21
> |
> 483 | 
> 484 | fn lsh(self, other: u64) -> Self {
> 485 | __lsh(self, other)
> | ----- This cast, from integer type of width sixty four to integer type of width thirty two, will lose precision.
> 486 | }
> 487 | fn rsh(self, other: u64) -> Self {
> |
> ____
> 
> warning
> --> /Users/alexey/.forc/git/checkouts/std-9be0d6062747ea7/7a095280e7e1c0bfbbfc201867896e720aab7209/sway-lib-core/src/ops.sw:488:21
> |
> 486 | 
> 487 | fn rsh(self, other: u64) -> Self {
> 488 | __rsh(self, other)
> | ----- This cast, from integer type of width sixty four to integer type of width thirty two, will lose precision.
> 489 | }
> 490 | }
> |
> ____
> 
> warning
> --> /Users/alexey/.forc/git/checkouts/std-9be0d6062747ea7/7a095280e7e1c0bfbbfc201867896e720aab7209/sway-lib-core/src/ops.sw:494:21
> |
> 492 | 
> 493 | fn lsh(self, other: u64) -> Self {
> 494 | __lsh(self, other)
> | ----- This cast, from integer type of width sixty four to integer type of width sixteen, will lose precision.
> 495 | }
> 496 | fn rsh(self, other: u64) -> Self {
> |
> ____
> 
> warning
> --> /Users/alexey/.forc/git/checkouts/std-9be0d6062747ea7/7a095280e7e1c0bfbbfc201867896e720aab7209/sway-lib-core/src/ops.sw:497:21
> |
> 495 | 
> 496 | fn rsh(self, other: u64) -> Self {
> 497 | __rsh(self, other)
> | ----- This cast, from integer type of width sixty four to integer type of width sixteen, will lose precision.
> 498 | }
> 499 | }
> |
> ____
> 
> warning
> --> /Users/alexey/.forc/git/checkouts/std-9be0d6062747ea7/7a095280e7e1c0bfbbfc201867896e720aab7209/sway-lib-core/src/ops.sw:503:21
> |
> 501 | 
> 502 | fn lsh(self, other: u64) -> Self {
> 503 | __lsh(self, other)
> | ----- This cast, from integer type of width sixty four to integer type of width eight, will lose precision.
> 504 | }
> 505 | fn rsh(self, other: u64) -> Self {
> |
> ____
> 
> warning
> --> /Users/alexey/.forc/git/checkouts/std-9be0d6062747ea7/7a095280e7e1c0bfbbfc201867896e720aab7209/sway-lib-core/src/ops.sw:506:21
> |
> 504 | 
> 505 | fn rsh(self, other: u64) -> Self {
> 506 | __rsh(self, other)
> | ----- This cast, from integer type of width sixty four to integer type of width eight, will lose precision.
> 507 | }
> 508 | }
> |
> ____
> 
> Compiled library "core" with 6 warnings.
> Compiling library std (git+https://github.com/fuellabs/sway?tag=v0.39.0#7a095280e7e1c0bfbbfc201867896e720aab7209)
> Compiling predicate limit-order-predicate (/Users/alexey/projects/fuel/ethglobal-predicate)
> Finished debug in 1.074838375s
> 
> ```
